-
-
Notifications
You must be signed in to change notification settings - Fork 993
Description
Describe the bug
Follow-up of #632, which didn't fully address this issue
Adding patches to composer.json for dev dependencies seems incorrect to me, for two reasons:
a) The local patch files won't be found in the module, AFAIK composer-patches won't look there
b) Even if they would be found, the project is likely to use a different version of phpunit where the patches don't apply.
To Reproduce
Steps to reproduce the behavior:
- composer init
- composer require cweagans/composer-patches predis/predis
- composer config extra.enable-patching true
- composer require --dev phpunit/phpunit
- Applying patches for phpunit/phpunit
./tests/phpunit_php7.patch (Fix PHP 7 compatibility)
Could not apply patch! Skipping. The error was: The "./tests/phpunit_php7.patch" file could not be downloaded: failed to open stream: No such file or directory
./tests/phpunit_php8.patch (Fix PHP 8 compatibility)
Could not apply patch! Skipping. The error was: The "./tests/phpunit_php8.patch" file could not be downloaded: failed to open stream: No such file or directory
Expected behavior
A clear and concise description of what you expected to happen.
Versions (please complete the following information):
- Predis: 1.1.x
- PHP 7.4
- Redis Server irrelevant
- OS: Ubuntu 20.10
I don't think it is possible to do this, not without cweagans/composer-patches introducing a patches-dev. My suggestion would be to switch to applying those patches with a script/travis commands (or whatever CI you use)