Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
What is stopping us from being able to run Drupal 7 tests against PHP 7? The current options only 5.3 through 5.6.
Comments
Comment #2
DamienMcKennaComment #3
DamienMcKennaComment #4
MixologicI think the primary issue is that d7 is not currently officially supported on php7 - (though how could it ever get there if it doesnt have testing?) - which leads to a bigger issue of "we dont currently have an active d7 maintainer", so theres a lot of work that has already gone into making D7 php7 compatible, but none of those patches have made it in.
Comment #5
DamienMcKennaIf someone would help identify what's necessary, I'll see if I can find someone to help with the work.
Comment #6
stefan.r CreditAttribution: stefan.r commentedSupporting php7 in core is top priority - see #2656548: Fully support PHP 7.0 in Drupal 7
Comment #7
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedAs far as I know, the situation here is the same for both core and contrib:
Regarding Drupal 7 core specifically, see #2656548: Fully support PHP 7.0 in Drupal 7 for more details, but the short summary is that the patches which were previously "needs review" are now RTBC, and the patches which were previously RTBC are now committed. The upcoming release should have all core tests passing on PHP 7 (and earlier).
But I don't think it even matters for this issue because:
I think the fix here is just to remove all the restrictions on the Automated Testing tab for Drupal 7. (The only ones that make sense to me are ones like preventing Drupal 8 tests on PHP < 5.5, since that's below the minimum core requirements.) Then it's left up to maintainers which tests they want to run.
I looked into the code to see what would be involved with that; it looks like the configuration for this is stored in a variable called
pift_ci_environments
, but I'm not sure where that variable gets set. However changing that variable seems like it would do it.Comment #8
MixologicIt's trivial to enable php7 testing for d7 contrib, (it is just a variable setting in settings.php), but our hesistation to enable it so far, has been that contrib tests may fail as a result of a particular piece of core code that is not php7 compatible, not because the contrib module itself is failing on php7. Perhaps this would be helpful to d7 maintainers to reveal additional areas of d7 that are not php7 ready, yet lack core code coverage?
If the d7 maintainers want it available as an option for d7 contrib projects, I'll go ahead and enable it.
Comment #9
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commented#8: As we are green on PHP 7 now, please go ahead and enable PHP 7 testing for contrib.
Comment #10
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedComment #11
MixologicNothing, now.
Comment #12
DamienMcKennaWoohoo! Thanks everyone!
Comment #13
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedThanks! But can we enable it for the other environments too, per the issue title?
I wouldn't want to turn those on for core because there are too many failures to make it worthwhile, but I think for contrib, PostgreSQL + SQLite testing could be useful. It seems sad to have the feature but then deliberately prevent it from being turned on...
Let me check first though (it's possible SQLite test support in Drupal 7 is in bad enough shape that there's no benefit even for contrib). If so maybe I'll create a separate issue.
Comment #14
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedOK, based on some testing I did this could be done for PostgreSQL now, but probably not SQLite.
And there were existing issues for both of them... so I put details on those issues instead.
Comment #15
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedThere are also some issues with PHP 5.5 and 5.6, it looks like - those appear to be testbot-related.