Problem/Motivation
In my current project we are using PHP8.0 and when I tried to install this module I got this error:
Problem 1
- Root composer.json requires drupal/rocket_chat == 2.5.0.0 -> satisfiable by drupal/rocket_chat[2.5.0].
- drupal/rocket_chat 2.5.0 requires php ^7.2 -> your php version (8.0.13) does not satisfy that requirement.
Problem 2
- Root composer.json requires drupal/rocket_chat_api == 2.5.0.0 -> satisfiable by drupal/rocket_chat_api[2.5.0].
- drupal/rocket_chat_api 2.5.0 requires php ^7.2 -> your php version (8.0.13) does not satisfy that requirement.
Proposed resolution
Using this package: PHPCompatibility/PHPCompatibility I ran the following command:
phpcs -p . --standard=PHPCompatibility
........................... 27 / 27 (100%)
Time: 408ms; Memory: 12MB
And it seems that this module is already compatible with PHP8, the only thing missing is let Composer know about this.
Remaining tasks
Update this:
"require": {
"ext-json": "*",
"php": "^7.2",
"drupal/core": "^8.8 || ^9"
},
To this:
"require": {
"ext-json": "*",
"php": "^7.2||^8",
"drupal/core": "^8.8 || ^9"
},
(Patch in my next comment.)
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | rocket_chat-3254242-6.patch | 14.42 KB | vladimiraus |
| #2 | 3254242-2.patch | 325 bytes | gnuget |
Issue fork rocket_chat-3254242
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
gnugetPatch attached.
Comment #3
gnugetComment #4
heliogabalthanks for the patch! I successfully applied the patch and could install the module afterwards, PHP 8.0.13 as well. Setting to RTBC because it's a trivial change that unblocks installation on Drupal 9. Would be helpful to be committed soon, so this module can be installed with composer again.
Comment #5
josh.chambers commentedI concur it would be nice to have this update pushed so I can update using composer without having to use ignore-platform-req
Comment #6
vladimirausUpdated requirements and coding standards.
Also check out #3298815: Offering to maintain Rocket.Chat.
Comment #7
vladimirausComment #8
vladimirausComment #9
sysosmaster commentedBumped Prio to reflect how out of date this code is & desire to use proper PHP.
I'll need to find some time to do a fresh test setup (I lost my previous test rig).
Comment #12
mortona2k commentedIt says the patch did not apply, so I created an issue fork and was able to apply the patch.
Comment #14
sysosmaster commentedComment #15
pandepoulus commentedAll submodules should also be compatible with php 8.
as composer why-not php:8.1
drupal/rocket_chat_api 3.0.0 requires php (^7.2)
Comment #16
vladimirausComment #18
sysosmaster commented@VladimirAus what is missing for Drupal 10 compatibility?
Cause I don't get why you added that tag...
Comment #19
pandepoulus commentedI think it works, but rocket_chat_api.info.yml has this line:
dependencies:
php: 7.4
and composer.json inside rocket_chat_api has this require:
Kind regards.
Comment #20
sysosmaster commented@Pandepoulus have you tried version 3.0.1 that should have fixed it.
Comment #21
pandepoulus commentedSorry i didn't see it yesterday.
Many thanks!