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.
Problem/Motivation
#2229183-55: use ContainerAwareTrait instead of extending ContainerAware documents this and has discussion/fix (to upgrade to 5.4.27)
Related
- #1498574: [policy, no patch] Require PHP 5.4.
- https://bugs.php.net/bug.php?id=60369
- https://bugs.php.net/bug.php?id=63002
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.
Comment | File | Size | Author |
---|---|---|---|
#12 | php_xcache.dll_.zip | 57.63 KB | plach |
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedComment #2
YesCT CreditAttribution: YesCT commentedComment #3
YesCT CreditAttribution: YesCT commentedthe d.o docs page to update is https://drupal.org/requirements
Comment #4
plachActually 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.
Comment #5
sun#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.
Comment #6
plach@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...
Comment #7
sunAFAICS, 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.
Comment #8
plachActually 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.
Comment #9
xjmis 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.
Comment #10
plachI 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.Comment #11
plachThe offending extension.
Comment #12
plachNow 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.
Comment #13
sunDoes MAMP use XCache, too?
Comment #14
plachI downloaded the MAMP 2.2 package and XCache is included and enabled by default. Maybe @xjm can confirm whether disabling it fixes the issue.
Comment #15
plachLet's wait for @xjm or any other to report their results on MacOSX.
Comment #16
bannorb CreditAttribution: bannorb commentedI 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.
Comment #17
plach@bannorb:
Thanks for reporting! Which PHP version are you using?
Comment #18
bannorb CreditAttribution: bannorb commented@plach:
Sorry, I forgot to mention that.
I'm using PHP version 5.4.10.
Comment #19
plachOk, 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?
Comment #20
YesCT CreditAttribution: YesCT commentedI 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
Comment #21
alexpottLooking 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
Comment #22
alexpott@bannorb has confirmed the issue - no need to wait for @xjm
Comment #23
xjmYes, 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.
Comment #24
plach@alexpott:
Actually we don't know yet whether upgrading to PHP 5.4.11 fixes the issue in mac environments even leaving XCache enabled.
Comment #25
tim.plunkettUnrelated issue with php 5.4.4: #2267551: [meta] Deal with PHP requirement vs. Debian PHP version numbering
Comment #26
YesCT CreditAttribution: YesCT commentedadding related issue in case people go there to find out the min version (as linked from https://www.drupal.org/requirements/php)
Comment #27
xjmSimilar issue: #2337591: Install failure on Windows: ThirdPartySettingsTrait::getThirdPartySetting not compatible with ThirdPartySettingsInterface::getThirdPartySetting error during install
Comment #30
joelpittetWe are at min >= 5.5.9 now. I think this is no longer relevant