vendor-patches
vendor-patches copied to clipboard
Executes unwanted vendor patches
{
"require": {
"predis/predis": "v1.1.6"
},
"require-dev": {
"phpunit/phpunit": "7.5.20",
"symplify/vendor-patches": "^11.2"
}
}
composer update
It crashes on
- Installing phpunit/phpunit (7.5.20): Extracting archive
- Applying patches for phpunit/phpunit
./tests/phpunit_php7.patch (Fix PHP 7 compatibility)
In RemoteFilesystem.php line 108:
[TypeError]
Argument 1 passed to Composer\Util\RemoteFilesystem::copy() must be of the type string, null given, called in phar:///usr/local/bin/composer2/src/Composer/Plugin/PluginManager.php(
274) : eval()'d code on line 388
The reason is that patch from a vendor library, pointing to its dev dependency, is executed in main project.
I am not sure if I like that feature at all - any library can broke any other library and I would not allow it.
In my case I am lucky as just simple predis/predis
library update saves my world (author moved that patch to its own composer.json on-update event).
But I consider it as a too-powerful-to-be-good feature and I am kindly asking you to remove processing of vendor patches.
BTW: Thank for your public libraries, they are very helpful.