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

[5.6] Move tightenco/collect to 'conflict' #23379

Merged
merged 1 commit into from
Mar 4, 2018

Conversation

antonioribeiro
Copy link
Contributor

According to this issue: composer/composer#7129, since tighenco/collect is not an illuminate's subtree, it must be set as a conflict and not a replacement.

Tested this change in a framework clone, and this this is what happens now, when installing spatie/crawler:

image

Currently, if we try to install spatie/crawler 4 along with laravel/framework 5.6, we get this:

image

@sisve
Copy link
Contributor

sisve commented Mar 3, 2018

How would this affect anyone running a newer version of Laravel (5.6) but referencing a package that depends on the older version of tightenco/collect (<5.5.33)?

We already know that people can get it to work with the current behavior, they just need to specify tightenco/collect as a root dependency. Can packages using the old tightenco/collect still get it to work, or will this break all those packages?

@antonioribeiro
Copy link
Contributor Author

antonioribeiro commented Mar 3, 2018

How would this affect anyone running a newer version of Laravel (5.6) but referencing a package that depends on the older version of tightenco/collect (<5.5.33)?

Not "depends on", but "conflicts with". If someone requires "tightenco/collect": "<=5.5.32" and "laravel/framework": "~5.6", the conflict will prevent people from receiving a tightenco/collect, because the namespace Illuminate\Support\Collection, present in both packages, would conflict.

We already know that people can get it to work with the current behavior, they just need to specify tightenco/collect as a root dependency. Can packages using the old tightenco/collect still get it to work, or will this break all those packages?

Because this is a composer.json, which may be different in every tagged version, this change will affect only users using Laravel >= 5.6.8 (if it gets merged and tagged), so if you set a requirement to laravel/framework:5.6.7, you would still have to add it to root to make it work, because that composer.json still has as replace and not conflict.

@GrahamCampbell
Copy link
Member

In hindsight, it was a mistake to ever edit the framework composer.json to deal with third party packages. Lesson learnt: never do this again for any other package.

@GrahamCampbell GrahamCampbell changed the title Move tightenco/collect to 'conflict' [5.6] Move tightenco/collect to 'conflict' Mar 3, 2018
@taylorotwell taylorotwell merged commit fe634d6 into laravel:5.6 Mar 4, 2018
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

Successfully merging this pull request may close these issues.

4 participants