--TEST--
Install of transitive dependency blocked because of malware blocking
--COMPOSER--
{
    "repositories": [
        {
            "type": "package",
            "package": [
                {
                    "name": "acme/library",
                    "version": "1.0",
                    "require": {
                        "acme/dependency": "1.0"
                    },
                    "dist": {
                        "type": "zip",
                        "url": "http://www.example.com/dist.zip",
                        "reference": "459720ff3b74ee0c0d159277c6f2f5df89d8a4f6"
                    }
                },
                {
                    "name": "acme/dependency",
                    "version": "1.0",
                    "dist": {
                        "type": "zip",
                        "url": "http://www.example.com/dist.zip",
                        "reference": "459720ff3b74ee0c0d159277c6f2f5df89d8a4f6"
                    }
                }
            ],
            "filter": {
                "malware": [
                    {
                        "package": "acme/dependency",
                        "constraint": "*",
                        "url": "https://example.org/malware/acme/dependency",
                        "reason": "malware",
                        "id": "ID-test",
                        "source": "Source"
                    }
                ]
            }
        }
    ],
    "config": {
        "policy": {
            "malware": {
                "block": true,
                "block-scope": "all"
            }
        }
    },
    "require": {
        "acme/library": "1.0"
    }
}
--RUN--
install

--LOCK--
{
    "packages": [
        {
            "name": "acme/library",
            "version": "1.0",
            "require": {
                "acme/dependency": "1.0"
            },
            "dist": {
                "type": "zip",
                "url": "http://www.example.com/dist.zip",
                "reference": "459720ff3b74ee0c0d159277c6f2f5df89d8a4f6"
            },
            "type": "library"
        },
        {
            "name": "acme/dependency",
            "version": "1.0",
            "dist": {
                "type": "zip",
                "url": "http://www.example.com/dist.zip",
                "reference": "459720ff3b74ee0c0d159277c6f2f5df89d8a4f6"
            },
            "type": "library"
        }
    ],
    "packages-dev": [],
    "aliases": [],
    "prefer-stable": false,
    "prefer-lowest": false,
    "platform": {},
    "platform-dev": {}
}

--EXPECT-EXIT-CODE--
2

--EXPECT-OUTPUT--
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Package acme/dependency 1.0 (in the lock file) was not loaded, because it was flagged as malware (see https://example.org/malware/acme/dependency) reason: malware. To ignore filters for this package, add the package to the "policy.malware.ignore" config. To turn the feature off entirely, you can set "policy.malware.block" to false.
  Problem 2
    - acme/library is locked to version 1.0 and an update of this package was not requested.
    - acme/library 1.0 requires acme/dependency 1.0 -> found acme/dependency[1.0] but these were not loaded, because they were flagged as malware (see https://example.org/malware/acme/dependency) reason: malware. To ignore filters for this package, add the package to the "policy.malware.ignore" config. To turn the feature off entirely, you can set "policy.malware.block" to false.

--EXPECT--
