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

DamienMcKenna created an issue. See original summary.

DamienMcKenna’s picture

Issue summary: View changes
DamienMcKenna’s picture

Issue tags: +PHP 7.0 (duplicate)
Mixologic’s picture

I 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.

DamienMcKenna’s picture

If someone would help identify what's necessary, I'll see if I can find someone to help with the work.

stefan.r’s picture

Supporting php7 in core is top priority - see #2656548: Fully support PHP 7.0 in Drupal 7

David_Rothstein’s picture

Title: PHP 7 support for Drupal 7 contrib? » Drupal 7 tests should not be blocked for certain environments (including PHP 7) on the Automated Testing tab of project pages
Category: Feature request » Task
Priority: Normal » Major

As far as I know, the situation here is the same for both core and contrib:

  • You can run PHP 7 tests against an individual patch by clicking "Add test", then "Custom parameters", then choosing it in the "Environment" dropdown.
  • But you can't do it for the project as a whole; the option on the Automated Testing tab of the project page is blank for Drupal 7.

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:

  1. Even if all core tests aren't passing in a particular environment, why would that necessarily mean a maintainer (especially a contrib maintainer) wouldn't want to run their tests in that environment?
  2. Core tests haven't been passing on PHP 5.4/5.5/5.6 either, but those environments are allowed. Not clear why PHP 7 is special :)

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.

Mixologic’s picture

It'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.

Fabianx’s picture

#8: As we are green on PHP 7 now, please go ahead and enable PHP 7 testing for contrib.

Fabianx’s picture

Status: Active » Reviewed & tested by the community
Mixologic’s picture

Status: Reviewed & tested by the community » Fixed

What is stopping us from being able to run Drupal 7 tests against PHP 7?

Nothing, now.

DamienMcKenna’s picture

Woohoo! Thanks everyone!

David_Rothstein’s picture

Thanks! 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.

David_Rothstein’s picture

Title: Drupal 7 tests should not be blocked for certain environments (including PHP 7) on the Automated Testing tab of project pages » Drupal 7 tests should not be blocked for PHP 7 on the Automated Testing tab of project pages
Related issues: +#2738927: Support running Drupal 7 tests against PostgreSQL as a "default" rather than "non-standard" environment, +#2738929: Support running Drupal 7 tests against SQLite as a "default" rather than "non-standard" environment

OK, 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.

David_Rothstein’s picture

There are also some issues with PHP 5.5 and 5.6, it looks like - those appear to be testbot-related.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.