google-cloud-php
google-cloud-php copied to clipboard
Conflict with psr/log when used with Symfony >= 6
Environment details
- OS: Linux Mint 21.2 / Kernel 6.2.0-37
- PHP version: 8.3.0
- Package name and version: google/cloud-logging v1.28.5 Latest
Since version 1.22.1, google/cloud-logging adds conflict with psr/log >=3, preventing the use with Symfony framework.
Steps to reproduce
- Install last Symfony last version
composer create-project symfony/skeleton:"7.0.*@dev" my_project_directory
- Install google/cloud-logging last version
composer require google/cloud-logging
- The following error should occurs :
Using version ^1.28 for google/cloud-logging
./composer.json has been updated
Running composer update google/cloud-logging
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- google/cloud-logging[v1.28.0, ..., v1.28.5] conflict with psr/log >=3.
- symfony/http-kernel v7.0.1 requires psr/log ^1|^2|^3 -> satisfiable by psr/log[3.0.0].
- symfony/framework-bundle v7.0.1 requires symfony/http-kernel ^6.4|^7.0 -> satisfiable by symfony/http-kernel[v7.0.1].
- symfony/framework-bundle is locked to version v7.0.1 and an update of this package was not requested.
- Root composer.json requires google/cloud-logging ^1.28 -> satisfiable by google/cloud-logging[v1.28.0, ..., v1.28.5].
Hello @gaea44!
unfortunately, as we still support PHP 7.4 (something that will be changing in the next couple months), we cannot support psr/log:3 because the interface requires union types, and our PsrLogger would throw a syntax error on PHP 7.4 if we added the union type syntax.
As soon as we drop support for PHP 7.4 (which should be in early 2024), we'll be able to support psr/log 3.
Since support for PHP 7.4 has now been dropped. Is there still a reason to keep the conflict on psr/log version 3?