Skip to content

Commit

Permalink
Replace tightenco/collect before the namespace change (#23153)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioribeiro authored and taylorotwell committed Feb 14, 2018
1 parent 5695079 commit 5caa88a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"illuminate/support": "self.version",
"illuminate/translation": "self.version",
"illuminate/validation": "self.version",
"illuminate/view": "self.version"
"illuminate/view": "self.version",
"tightenco/collect": "<5.5.33"
},
"require-dev": {
"aws/aws-sdk-php": "~3.0",
Expand Down

5 comments on commit 5caa88a

@brendt
Copy link
Contributor

@brendt brendt commented on 5caa88a Mar 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antonioribeiro Is there a specific reason the tightenco/collect version is set to <5.5.33 ? This config seems to give some problems with packages that depend on higher tightenco/collect versions.

spatie/crawler depends on tightenco/collect:^5.6 and so it fails to install on projects with laravel/framework higher than 5.6.3.

This is our composer setup: https://github.com/spatie/crawler/blob/master/composer.json#L25

@brendt
Copy link
Contributor

@brendt brendt commented on 5caa88a Mar 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's my guess that tightenco/collect:^5.6 should also be allowed here?

https://github.com/tightenco/collect/releases

@antonioribeiro
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Laravel 5.6 should not replace Collect >=5.5.33, after the namespace change from Illuminate/Support to Tighenco/Collect, if Laravel ignores it during install, the namespace Tighenco/Collect will not be available.

So this replacement had to change in Laravel. It tells Composer to "do ignore the Collect requirement if the Collect version is below 5.5.33", because Collect's namespace will conflict with Illuminate's.

We have an issue about the installation problem: tighten/collect#88 and a question on Composer: composer/composer#7129, which is (kind of) understood, but still seems like a bug, since you are able install it, depending on the order you install the packages.

So, if you do

composer require laravel/framework
composer require spatie/crawler

But usually works when:

composer require laravel/framework
composer require tightenco/collect
composer require spatie/crawler

But this should not make any difference, right?

@antonioribeiro
Copy link
Contributor Author

@antonioribeiro antonioribeiro commented on 5caa88a Mar 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's it working

image

*Framework

@mathieutu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see : #23272

Please sign in to comment.