When using this plugin with the package "roave/security-advisories", I get the following error, due to the fact that getInstallPath() returns null:
In Directory.php line 58:
[RuntimeException]
Directory name must not be empty.
With another composer version:
Deprecation Notice: RecursiveDirectoryIterator::__construct(): Passing null to parameter #1 ($directory) of type string is deprecated in /app/vendor/liborm85/composer-vendor-cleaner/src/Directory.php:58
In Directory.php line 58:
[ValueError]
RecursiveDirectoryIterator::__construct(): Argument 1 ($directory) cannot be empty
Problem
When using this plugin with the package "roave/security-advisories", I get the following error, due to the fact that getInstallPath() returns
null
:With another composer version:
Reproduction
Composer file to reproduce this:
... by running
docker run --rm --interactive --tty --volume $PWD:/app composer update
Solution
To avoid the error and the deprecation, I would like to introduce a null check additionally to the empty string check.