Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executes unwanted vendor patches #8

Open
jaroslavtyc opened this issue May 12, 2023 · 0 comments
Open

Executes unwanted vendor patches #8

jaroslavtyc opened this issue May 12, 2023 · 0 comments

Comments

@jaroslavtyc
Copy link

{
    "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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant