Closed nafiesl closed 4 years ago
Running into this issue this morning as well.
I've reverted the PR for this. Please see my remarks on the PR itself.
I'm not sure where symfony/css-selector with a ^5.0 requirement comes from but Laravel 6 (or any below version) doesn't supports Symfony 5. Symfony 5 support will be released with Laravel 7 at the end of February and Browser Kit Testing 6 will be released with Symfony 5 support as well then.
I'm not sure where symfony/css-selector with a ^5.0 requirement comes from
I will help to investigate it.
Hi @driesvints, I found that current laravel 6.9.0 is dependent to tijsverkoyen/css-to-inline-styles:^2.2.1
which dependent to symfony/css-selector
.
On latest laravel installation, we will have tijsverkoyen/css-to-inline-styles:2.2.2
installed, which will also installs symfony/css-selector:v5.0.2
. This is why laravel/browser-kit-testing
cannot be installed since it does not compatible with symfony/css-selector:v5.x
.
I think we have 3 choises here:
Change dependent version of tijsverkoyen/css-to-inline-styles
on laravel/framework
dependencies to <=2.2.1
.
https://github.com/laravel/framework/blob/6.x/composer.json#L42
"tijsverkoyen/css-to-inline-styles": "<=2.2.1",
So we will only get this package up to v2.2.1
(at least for laravel 6.x).
#2.2.1 vs #2.2.2
We add support (only) for symfony/css-selector:5.x
on browser-kit-test package:5.0.x
"symfony/css-selector": "^4.2 | 5.0.*",
We ask tijsverkoyen/css-to-inline-styles
to remove dependency of symfony/css-selector:5.x
for version 2.2.x
.
What do you think @driesvints?
@nafiesl that library also supports 4.x so it should be perfectly possible to install both that library and browser kit testing 5.x in laravel 6.x:
https://github.com/tijsverkoyen/CssToInlineStyles/blob/master/composer.json#L18
Ok @driesvints, got your point. I have successfully installed browser-kit-testing this way:
$ composer require symfony/css-selector:^4.0
$ composer require laravel/browser-kit-testing --dev
We require symfony/css-selector 4 directly as the project dependency. At least this helps us to use the package until we have Laravel 7 and Browser Kit Testing 6.
Thanks for your help @driesvints.
Description:
Hi, when installing this package to Laravel 6.9.x, I have got this dependency error.
Steps To Reproduce:
I think the problem is this dependency. https://github.com/laravel/browser-kit-testing/blob/5.0/composer.json#L23 Somehow we were forced to use
symfony/css-selector
version 5.x.Maybe we should use change these lines https://github.com/laravel/browser-kit-testing/blob/5.0/composer.json#L22-L26 to :
Thanks.