Problem/Motivation
Your Composer dependencies require a PHP version ">= 8.1.6". You are running 8.1.2-1ubuntu2.19.
Steps to reproduce
Install the latest version of Commerce Stripe (8.1.2) - this introduces a dependency on PHP for version >= 8.1.6.
The LTS version on Ubuntu 22.04.5 is PHP 8.1.2-1ubuntu2.19 - the site will then not load.
Proposed resolution
Within composer.json - do we absolutely need the minor version 8.1.6? I expect any critical bug fixes will be backported into the Ubuntu Repo?
"require": {
"php": ">=8.1.6",
"drupal/commerce": "^2.40 || ^3",
"stripe/stripe-php": "^7.25 || ^15",
"ext-curl": "*"
},
Will 8.1.2 suffice - does the dependency come from another project downstream?
I've added a composer dependency on our server platform PHP version - to fix it to:
},
"platform": {
"php": "8.1.2"
}
Which then removes the Stripe update - along with the Stripe-PHP update. Would rather stay on the updated branch - but that would mean me updating my entire Server version to Ubuntu '24.04.1 LTS' - which means Wordpress that is on the same server having "beta" support: https://make.wordpress.org/core/handbook/references/php-compatibility-an...
Other workaround would be to use the approach seen here (would rather stay with LTS repos on Ubuntu):
https://www.drupal.org/forum/support/post-installation/2023-01-04/ubuntu...
Issue fork commerce_stripe-3485881
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tomtech commentedHi @newaytech!
Thanks for the question.
For php 8.1.x, there is an OPcache bug that is fixed in 8.1.6.
It is recommended to NOT use 8.1.0-8.1.5.
It is surprising to hear that WP only has beta support for PHP8.
In this post, they discuss how to upgrade Ubuntu 22.04 LTS to later PHP 8.1.x:
https://www.drupal.org/forum/support/post-installation/2023-01-04/ubuntu...
Hopefully, this would resolve the issue for you.
Comment #3
newaytech commentedThanks @tomtech. I've taken the plunge and am now using the custom repos for both PHP and Apache...
Comment #4
tomtech commentedWe've had reports that some hosting are running php 8.1.x with patches to resolve the issue, but are not able to upgrade to 8.1.6 or later for some reason.
This change lowers the php version requirement to 8.1 to assist those sites.
It is still highly recommended that you use 8.1.6 or later.
If you are using php 8.1.x < 8.1.6, please ensure you have the patch in place to avoid any issues on your site.
Comment #7
tomtech commented