Problem/Motivation
Running compose require drupal/devel_php on a php7.3(or less) environment, installs the latest version which is not compatible with it.
Steps to reproduce
Running compose require drupal/devel_php on a php7.3 environment.
Proposed resolution
Adds "php": ">=7.4" requirement in the composer.json
Issue fork devel_php-3274188
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 #3
damien laguerre commentedComment #4
grimreaperHello,
My bad, thanks for the catch.
I had the same problem in the Matomo module too.
And as Drupal 9 core is still supporting PHP 7.3, the solution should be to remove type in properties.
In this case, I will see if at this moment I should create a new branch for D10 and PHP 8.1 or waiting for D9 to not be supported.
Comment #5
grimreaperComment #7
damien laguerre commentedHello,
I suggested adding this requirement in composer.yml because the requirement is already in the .info.yml.
But yes, the best solution might be to remove the types.
Comment #8
grimreaperThanks for the info, then it means that composer.json overrides php version requirement from .info.yml.
OK, I forgot that I put the requirement in .info.yml so it means that I thought about it :p
Hum, If I didn't published 8.x-1.4 we could have stayed with the requirement of PHP >= 7.4 because Devel PHP is quite stable and it is only some code quality changes, so people would have stayed on 8.x-1.3, but the problem is that people will end up with 8.x-1.4 version.
So I have to make a new one.
Comment #9
grimreaperCan you give a try to https://git.drupalcode.org/project/devel_php/-/merge_requests/6 please?
Comment #10
damien laguerre commentedTested!
There are no more errors, everything works fine in PHP7.3.
Thanks for your speed ;-)
Comment #13
grimreaperThanks!
And thanks for the quick bug report too!
New release done: https://www.drupal.org/project/devel_php/releases/8.x-1.5
Comment #14
grimreaperHum, I forgot to remove PHP 7.4 in .info.yml.
Doing too many stuff in parallel, sorry.
I will keep it as it is for now and remove in a new issue if someone needs the change.