GoogleCloudPlatform / functions-framework-php

FaaS (Function as a service) framework for writing portable PHP functions
Apache License 2.0
212 stars 37 forks source link

psr/http-message version compatibility #161

Open syslogic opened 1 year ago

syslogic commented 1 year ago

Statically requiring ^1.0 may cause dependency issues; this should be ^1.1 || ^2.0 instead. https://github.com/GoogleCloudPlatform/functions-framework-php/blob/5b645eedc7508a16481c364e8cd209fb176d3e03/composer.json#L8

For example (with optional switch -t):

composer why psr/http-message   
google/auth                      v1.30.0 requires psr/http-message (^1.1||^2.0)
google/cloud-core                v1.52.4 requires psr/http-message (^1.0|^2.0)
google/cloud-functions-framework v1.3.0  requires psr/http-message (^1.0)
guzzlehttp/psr7                  2.6.1   requires psr/http-message (^1.1 || ^2.0)
psr/http-client                  1.0.2   requires psr/http-message (^1.0 || ^2.0)
psr/http-factory                 1.0.2   requires psr/http-message (^1.0 || ^2.0)

The error message may be:

You can only install one version of a package, so only one of these can be installed:
psr/http-message[dev-master, 1.0, 1.0.1, 1.1, 2.0, 2.0.x-dev].

Seen that also library cloudevents requires ^1.0.1 statically.

This may or may not be compatible.