Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow deprecation-contracts 3 #2961

Merged
merged 2 commits into from Dec 6, 2021

Conversation

derrabus
Copy link
Contributor

@derrabus derrabus commented Dec 1, 2021

No description provided.

@GrahamCampbell GrahamCampbell merged commit 1d347d7 into guzzle:master Dec 6, 2021
23 checks passed
@derrabus derrabus deleted the bump/contracts-3 branch Dec 6, 2021
@simondotws
Copy link

simondotws commented Dec 20, 2021

@derrabus @GrahamCampbell v3.0 of deprecation-contracts requires a minimum version of PHP8.0 so causes issues for people still on PHP7

@GrahamCampbell
Copy link
Member

GrahamCampbell commented Dec 20, 2021

It won’t, because we did not drop v2.

@simondotws
Copy link

simondotws commented Dec 20, 2021

Installing causes a composer version error as it installs 3.0.0 by default with a PHP version of >=8.0.2 so it requires --ignore-platform-reqs to avoid the error.

@GrahamCampbell
Copy link
Member

GrahamCampbell commented Dec 20, 2021

This is only because you generated your lock file using PHP 8 or did not include the proper platform config in your app's composer.json file to force it to fetch PHP 7.4 compatible dependencies.

@GrahamCampbell
Copy link
Member

GrahamCampbell commented Dec 20, 2021

it requires --ignore-platform-reqs to avoid the error.

I would highly, highly recommend not doing that, as the code you install will fail at runtime, and not actually work.

@togethernet
Copy link

togethernet commented Jan 26, 2022

This is only because you generated your lock file using PHP 8 or did not include the proper platform config in your app's composer.json file to force it to fetch PHP 7.4 compatible dependencies.

What would be the proper platform config in composer.json to force fetch PHP 7.4 compatible dependencies?

@mhamann
Copy link

mhamann commented Mar 29, 2022

You could set (though I don't recommend):

{
  "config": {
    "platform": {
      "php": "7.4"
    }
  }
}

You lose flexibility and can have weird stuff happen when explicitly setting the platform here, because you're basically forcing composer to ignore the actual version of PHP you're using.

Instead, just make sure that you're using the correct version of PHP CLI. For example, I ran into this and in my case, my server was running PHP 7.4, but my command line was using PHP 8.1. So, when doing an install of guzzle, I was getting a version of symfony/deprecation-contracts that was incompatible with the server PHP version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants