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

Multiple packages use the same patch throw an array to string exception #38

Closed
deviantintegral opened this issue Apr 12, 2016 · 3 comments

Comments

@deviantintegral
Copy link

If I set up package A with a patch, and package B with the same patch, and set package A to require B, the URLs are merged into an array. This causes composer install to bail with an array to string conversion.

www 2016-04-12 15-21-14

@cweagans
Copy link
Owner

Good find! That's definitely not the desired behavior :)

@grasmash
Copy link
Contributor

This is caused by $this->patches = array_merge_recursive($this->patches, $extra['patches']);
in Patches.php.

grasmash added a commit to grasmash/composer-patches that referenced this issue Dec 20, 2016
cweagans added a commit that referenced this issue Feb 16, 2017
Fixes #38: Multiple packages using the same patch throws an array to string exception.
lacun pushed a commit to lacun/composer-patches that referenced this issue Jul 27, 2017
@lacun
Copy link

lacun commented Jul 27, 2017

Hello,
On a project, the array to string conversion problem occurs when calling composer install with already installed patches.
It's caused by the remaining call to $this->patches = array_merge_recursive($this->patches, $extra['patches']);

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

4 participants