Closed stepanenko3 closed 3 years ago
Hey @mattstauffer, do you guys have plans of at least add support to php 8.0? Thanks!
@leopoletto do we get any value from Spatie's 4.0 package? Does it have any valuable additional features? If so, let's update it. If not, let's keep it at the versions we have right now so we don't all of a sudden block all 7.* users. Thanks!
@mattstauffer it's more about the PHP version I guess because lots of packages require PHP 8.0-only.
To be able to use them and yours as well requires bumping the version. It is possible to keep version 0.x updated to satisfy PHP 7.x users and create a new major version in which is required PHP 8-only.
Do you think it is worth the extra time of maintenance?
@leopoletto -- In reviewing the releases for the spatie/laravel-analytics
package. His 3.10.2 release says it adds support for PHP 8, while the 4.0.0 release removes support for PHP 7. Can you detail the issue you were having, using the this package as is with PHP 8?
@krievley the problem is not Spatie's package. I described it in this pull request https://github.com/tighten/nova-google-analytics/pull/36
@krievley I'm sorry, now I understand your point. Could you take a look at this and help me figure out what is the problem?
Problem 1
- symfony/cache[v4.3.0-BETA1, ..., v4.4.8] require php ^7.1.3 -> your php version (8.0.8) does not satisfy that requirement.
- symfony/cache[v4.4.20, ..., 4.4.x-dev, v5.2.4, ..., 5.4.x-dev] require psr/cache ^1.0|^2.0 -> found psr/cache[1.0.0, 1.0.1, 2.0.0] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- symfony/cache[v4.4.9, ..., v4.4.19, v5.0.9, ..., v5.2.3] require psr/cache ~1.0 -> found psr/cache[1.0.0, 1.0.1] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- symfony/cache[v5.0.0-BETA1, ..., v5.0.0-RC1] require php ^7.2.9 -> your php version (8.0.8) does not satisfy that requirement.
- symfony/cache[v5.0.0, ..., v5.1.0-RC1] require php ^7.2.5 -> your php version (8.0.8) does not satisfy that requirement.
- spatie/laravel-analytics[3.6.0, ..., 3.6.x-dev] require php ^7.0 -> your php version (8.0.8) does not satisfy that requirement.
- spatie/laravel-analytics[3.7.0, ..., 3.10.1] require php ^7.2 -> your php version (8.0.8) does not satisfy that requirement.
- tightenco/nova-google-analytics v0.2.0 requires spatie/laravel-analytics ^3.6 -> satisfiable by spatie/laravel-analytics[3.6.0, ..., 3.11.0].
- spatie/laravel-analytics[3.10.2, ..., 3.11.0] require symfony/cache ^4.3|^5.0 -> satisfiable by symfony/cache[v4.3.0-BETA1, ..., 4.4.x-dev, v5.0.0-BETA1, ..., 5.4.x-dev].
- Root composer.json requires tightenco/nova-google-analytics ^0.2.0 -> satisfiable by tightenco/nova-google-analytics[v0.2.0].
Have you guys used the package with PHP 8.0 already?
OK, I did a test run on PHP 8.
laravel new test
cd test
composer require spatie/laravel-analytics:"^3.6"
This worked fine.
composer require tightenco/nova-google-analytics
This worked fine, other than Nova not being installed.
These both gave me Symfony/cache@5.3.4, which I don't see on your constraint list above. Is it possible you have some other constraint keeping you from getting a high enough version of symfony/cache
? I'm surprised we wouldn't see it in that error message, but it's certainly possible. I do see that your lock file has a fixed version of psr/cache
, so that may be the issue.
@mattstauffer Yes, I ran the command composer update spatie/laravel-analytics --with-all-dependencies
which downgraded the following packages:
- Downgrading guzzlehttp/psr7 (2.0.0 => 1.8.2)
- Downgrading psr/cache (3.0.0 => 2.0.0)
Now I'm able to use it.
Thank you for your help, do you want me to close this PR https://github.com/tighten/nova-google-analytics/pull/37?
@leopoletto yep, thanks!
@stepanenko3 Thanks! Do we get any value from this? PHP 7.4 will be supported until the end of 2022, so I'd rather not require PHP 8.