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

drupal-check forces to use PHP 7.3 #3761

Closed
jayakrishnanj opened this issue Jul 19, 2019 · 4 comments · Fixed by #3769
Closed

drupal-check forces to use PHP 7.3 #3761

jayakrishnanj opened this issue Jul 19, 2019 · 4 comments · Fixed by #3769
Labels
Support A support request

Comments

@jayakrishnanj
Copy link
Contributor

jayakrishnanj commented Jul 19, 2019

Updated Project Repo to Latest BLT v10.2.0.
image

You can see in the above screenshot, mglaman/drupal-check ^1.0.10 includes jean85/pretty-package-versions ^1.2 as dependency and ocramius/package-versions ^1.2.0 is added as depedency as a child.

By default ocramius/package-versions package is updating to stable version of '1.5.0' which needs PHP 7.3 [https://packagist.org/packages/ocramius/package-versions#1.5.0]
Due to the above case, BLT is forcing to update project to PHP 7.3 version.

is there any possibility to degrade ocramius/package version to 1.4.0 ?

  • BLT version: [10.2.0]

cc: @mikemadison13 Related to #3710

@jayakrishnanj jayakrishnanj added the Support A support request label Jul 19, 2019
@jayakrishnanj
Copy link
Contributor Author

For now, Resolved using composer require ocramius/package-versions:1.4.0 Please let me know if this is right way to resolve the issue ?

@danepowell
Copy link
Contributor

How did you initially come to have ocramius/package-versions:1.5.x installed? My guess is that you created the project or ran composer update on a machine with PHP 7.3 installed, and then tried to run it on a machine without it.

Always run composer update in an environment with your minimum supported PHP version. If that's not possible for some reason, then yes you will need to manually restrict package versions that require higher PHP versions.

@danepowell danepowell added the Awaiting response Maintainer needs more info label Jul 22, 2019
@danepowell
Copy link
Contributor

Actually instead of pinning that one package, try running composer config platform.php 7.1 && composer update and see if that pins downstream packages to a 7.1-compatible version. If so, maybe we should add that to blt-project/composer.json.

https://andy-carter.com/blog/composer-php-platform

jayakrishnanj added a commit to jayakrishnanj/blt that referenced this issue Jul 23, 2019
@jayakrishnanj
Copy link
Contributor Author

Thank you @danepowell , Awesome as usual :)

That resolved the issue, Kept local environment PHP to 7.3 to stay ahead but sometimes that gives these issues.
Fixed my project repo with the platform.php 7.2 and also setting up my local PHP to 7.2 :)

Created PR #3769 to fix the composer php version

@no-response no-response bot removed the Awaiting response Maintainer needs more info label Jul 23, 2019
danepowell pushed a commit that referenced this issue Jul 24, 2019
* Fixes #3761 - Set Composer PHP Platform to 7.2.

* Normalized composer.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support A support request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants