Problem/Motivation
#2617568: Rename apc_* functions with apcu_* switched all core code to use apcu_* functions instead of apc_*
Unfortunately, Symfony's APC class loader does not support APCu yet - it still uses the old apc_* functions. This results in fatal errors on sites running PHP 7 that have APCu installed, but not the apc bc support, which has been split to a separate project: https://github.com/krakjoe/apcu-bc
An immediate workaround for sites affected is to either disable the apcu extension, or install and enable the APC backwards compatibility extension.
Proposed resolution
Check for apc_* before trying to use the Symfony APC classloader.
A follow-up issue has been created to address the issue with the classloader itself.
Remaining tasks
User interface changes
API changes
Data model changes
RuntimeException: Unable to use ApcClassLoader as APC is not enabled
I've just recently installed a Drupal 8.0.1 instance.
I note today's update to 8.0.2.
On exec of update
drush up
Update information last refreshed: Wed, 01/06/2016 - 14:44
Name Installed Version Proposed version Message
Drupal 8.0.1 8.0.2 Update available
...
Do you really want to continue? (y/n): y
Project drupal was updated successfully. Installed version is now 8.0.2.
...
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2646100-4-drupalkernel-apcclassloader.patch | 999 bytes | gapple |
Comments
Comment #1
Anonymous (not verified) commentedbugsonly created an issue. See original summary.
Comment #2
Anonymous (not verified) commentedapcu now needs a separate module for apc backward compatibility
here,
leads to sources at
after install
error "RuntimeException: Unable to use ApcClassLoader as APC is not enabled." is now gone
leaving this open so it's noted, perhaps flagged in Drupal installer.
at some point, arguably, the upstream Symfony apcu(current)-vs-apc(deprecated) dependency needs to be addressed
Comment #3
Anonymous (not verified) commentedComment #4
gappleThis was caused by the changes in #2617568: Rename apc_* functions with apcu_*. The ApcClassLoader is (attempted to be) used if apcu_fetch() is available, but ApcClassLoader requires that the apc extension is loaded (or is emulated by a BC option for APCu).
I could not find any Symfony issues for 2.7/2.8. The only issue I found was https://github.com/symfony/symfony/issues/16830, which mentions Symfony 3.
Comment #5
gappleComment #6
gappleI don't know that adding APCu support would be in scope for Symfony 2.7 / 2.8, so Drupal may need its own class to enable equivalent functionality without backwards compatibility in APCu.
Comment #7
catchThat's... disappointing, I think we just completely missed that Symfony isn't properly compatible with APCu in the other issue.
Since this is a fatal error caused by a patch release, bumping to critical.
Patch looks fine for a quick fix, I missed the patch here and wrote almost the same thing.
Comment #8
catchComment #9
catchAdded to 8.0.2 release notes: https://www.drupal.org/node/2645600
Comment #10
geerlingguy commentedRTBC x2 here (plus critical status); ran into this myself today after hearing about it from a few different people. As it is, I'll just run 8.0.2 + this patch for the site in question, but would like to see this get committed soon!
Comment #11
catchGive the RTBC x 2, I think I can go ahead and commit this.
Committed/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!