Problem/Motivation

#2229183-55: use ContainerAwareTrait instead of extending ContainerAware documents this and has discussion/fix (to upgrade to 5.4.27)

Related

Proposed resolution

Update the requirements doc, https://drupal.org/requirements

Maybe also implement in code like #2152073: Bump Drupal core's PHP requirement to 5.4.2 ?

Remaining tasks

  • discuss
  • ?

User interface changes

No.

API changes

No.

CommentFileSizeAuthor
#12 php_xcache.dll_.zip57.63 KBplach
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

Issue tags: +d8 dev environment
YesCT’s picture

Issue tags: +PHP 5.4
YesCT’s picture

Issue summary: View changes

the d.o docs page to update is https://drupal.org/requirements

plach’s picture

Actually I am not sure 5.4.27 is the minimum version fixing the issue described in #2229183-55: use ContainerAwareTrait instead of extending ContainerAware. I tried the latest of the 5.4.x branch as it was the most likely to fix it, but we should not enforce the most recent 5.4.x version if that's not absolutely required.

sun’s picture

#1498574: [policy, no patch] Require PHP 5.4 negotiated the minimum feasible PHP version across distros already.

→ Bumping it higher than 5.4.2 may cause Drupal to not be operable on some distros. Bumping the minimum PHP version always needs a 360° analysis of the adoption rate of the market/distros.


Lastly, FWIW, #2229183: use ContainerAwareTrait instead of extending ContainerAware was a purely cosmetic change only. We should roll back that commit if it requires a PHP version that isn't available on major distros by default.

plach’s picture

@sun:

Would it be feasible to recommend a higher PHP version just for Windows, so distros would be unaffected by this policy change? I am not even sure the error I saw can be reproduced consistently in any WAMP environment...

sun’s picture

AFAICS, that would be feasible, but only if we'd limit that platform-specific change to the installer (or more specifically: install.php) — but not to the runtime check / constant.

Otherwise, we'd need to have a conditional environment check at regular runtime (on every request) in order to declare the constant, which sounds terrible to me.


The parent issue mentioned a possible relationship to WinCache — is that sorted out (eliminated)?

→ If the problem only occurs with WinCache, then this issue simply won't fix.

There's a backport of the OpCache in PHP 5.5 for PHP 5.4, which is the only sensible thing that we can and should support.


Just to clarify my stance: I'm just paraphrasing here. Personally, I'd love to bump the minimum PHP version as high as reasonable/possible (and/or even require PHP 5.5). I understand the concerns being raised by others regarding default versions available to *nix distros though.

plach’s picture

AFAICS, that would be feasible, but only if we'd limit that platform-specific change to the installer (or more specifically: install.php) — but not to the runtime check / constant.

Actually I was referring just to the requirements documentation, but this would be even better (or maybe both). Runtime platform detection does not sound good to me either...

I am not really sure the WinCache issue linked in the OP is actually affecting us, for sure it wasn't the cause of the errors in my environment, as I don't have it enabled.

xjm’s picture

is 5.4.27 the earliest version of PHP that works for Windows?

Also, as I posted on the other issue: the trait commit commit also broke installation for me on OS 10.8, using PHP 5.4.10 with MAMP (2.1.2). I'm going to try upgrading MAMP and see if it resolves the issue.

plach’s picture

I did some more experiments: PHP 5.4.9 fixes the issue here.

I did even more experiments: actually the issue is caused by the php_xcache.dll extension (you can find it attached), disabling it fixes the issue even on PHP 5.4.8. Enabling XCache breaks Apache on 5.4.8, 5.4.9 and 5.4.10. From 5.4.11 XCache seems to behave correctly or at least does not affect page generation.

plach’s picture

The offending extension.

plach’s picture

Title: [policy, no patch] Require PHP 5.4.27 for windows » [policy, no patch] Require PHP 5.4.11 for windows
FileSize
57.63 KB

Now for reals :)

Actually I think we can won't fix this and just add a note somewhere in the requirements page, unless the OSX issue is more severe.

sun’s picture

Does MAMP use XCache, too?

plach’s picture

I downloaded the MAMP 2.2 package and XCache is included and enabled by default. Maybe @xjm can confirm whether disabling it fixes the issue.

plach’s picture

Title: [policy, no patch] Require PHP 5.4.11 for windows » Suggest 5.4.11 as minimum PHP version for Windows and MacOS if XCache is enabled
Status: Active » Postponed (maintainer needs more info)

Let's wait for @xjm or any other to report their results on MacOSX.

bannorb’s picture

I was having trouble reinstalling Drupal 8 on localhost. I would go to the localhost url and the page would not load and got the spinning wheel of death.

I resolved this by:
1. Going to the mamp app.
2. Click on Preferences.
3. Click on the PHP tab.
4. Change Cache to none (--).
5. Reload page.

The page reloaded correctly.

I'm using PHP version 5.4.10.

plach’s picture

@bannorb:

Thanks for reporting! Which PHP version are you using?

bannorb’s picture

@plach:

Sorry, I forgot to mention that.
I'm using PHP version 5.4.10.

plach’s picture

Ok, this partially confirms my findings for the Windows environment (see #10).

@xjm:

Can you upgrade your PHP to 5.4.11 to see whether that fixes the issue?

YesCT’s picture

I didn't try 5.4.11 ( I skipped and went to 5.5.10 ) but I was having a seg fault when running phpunit tests with 5.4.4

alexpott’s picture

Looking at the internets this definitely seems to be an issue with xcache and nto php itself. http://xcache.lighttpd.net/ticket/295 / http://xcache.lighttpd.net/browser/tags/3.1.0/ChangeLog

alexpott’s picture

Status: Postponed (maintainer needs more info) » Active

@bannorb has confirmed the issue - no need to wait for @xjm

xjm’s picture

Yes, I upgraded MAMP to get around this issue when I commented previously and can't roll back to 5.4.10 without a lot of futzing.

plach’s picture

@alexpott:

Actually we don't know yet whether upgrading to PHP 5.4.11 fixes the issue in mac environments even leaving XCache enabled.

tim.plunkett’s picture

YesCT’s picture

adding related issue in case people go there to find out the min version (as linked from https://www.drupal.org/requirements/php)

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Status: Active » Closed (outdated)

We are at min >= 5.5.9 now. I think this is no longer relevant