Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Nov 2015 at 20:46 UTC
Updated:
11 Jan 2016 at 19:26 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
fabianx commentedComment #3
dawehner+1
... there is no patch yet
Comment #4
andypostAccording https://github.com/krakjoe/apcu/issues/104 there's no docs about API
so looks that extension should be build with apc support
Comment #5
fabianx commentedUhm, nevermind. The BC layer still exists, but needs to be configured (--enable-apcu-bc), but better to distinguish I think.
Comment #6
fabianx commentedLittle problems atm. with BC layer:
https://github.com/krakjoe/apcu/issues/144#issuecomment-157524177
Comment #7
catchComment #8
amateescu commentedSince we require PHP 5.5, this issue sounds like a very good idea :)
Comment #10
andypostSuppose this should be reverted
Comment #11
hussainwebMy guess is that the tests fail because it can't find APCUIterator. Is there any way to know the version of apcu on the testbots? It needs to be apcu 5.0.0 at least.
Comment #12
hussainwebOkay, in the full log, I see the error:
It doesn't seem it is apcu 5.0.0. Do we have something on requirements with apcu? If we have to support apcu 4, I don't think we can do this in 8.0.1.
Comment #13
catchWe don't have any requirements set either way for APCu.
Any requirements change is going to be a minor release, so moving to 8.1.x for now.
We should consider a follow-up issue here to add hook_requirements() and detect the case where APCu is available but the backwards compatibility layer isn't enabled - or at least add that to drupal.org/requirements.
Also needs a DrupalCI issue for the APCu version change.
Comment #14
alexpottSo what is super interesting is that PHP7 is performing so well on testbot without APCu which was a massive performance boost. I think this will mean that we'll need to two versions of the APCBackend - one which supports the latest APCu on PHP7 and the one we have now.
Comment #15
amateescu commented@andypost,
apc_delete_file()does not exist in APCu 4.0.0, which is the first version compatible with PHP 5.5, so at this point it's just dead code :)@alexpott, that sounds like a good way forward which would allow us to do this change even in 8.0.1.
How about something like this?
Comment #17
amateescu commentedThird time's the charm.
Comment #18
alexpottShould we be doing this a runtime? Couldn't we add the classname to be used as an argument in a compiler pass? Otherwise we might as well do this in the getIterator() method of ApcuBackend.
Comment #19
amateescu commentedThat's exactly what I did initially, but then I thought that having it in the factory is cleaner and more explicit. No strong preference either way though :)
Comment #21
joelpittetComment #22
amateescu commentedNow with less silliness :)
Comment #23
amateescu commented...
Comment #28
fabianx commented#23 looks fantastic to me and no BC break either :).
To #18:
There is one backend thanks to the container for APCu - so this is called one time at service instantiation, which is perfectly fine to do at run-time.
Comment #33
andypostPlease move version check to constructor, it makes no sense to do that each time in get()
Comment #34
cilefen commentedComment #35
fabianx commentedBack to RTBC, that is indeed cleaner.
Comment #36
neclimdulThis makes me very happy. Fits very nicely in the existing interfaces. +1
Comment #37
alexpottThis is a bug - our APCu backend is broken on PHP7 - this patch fixes it. Committed b1b8cf5 and pushed to 8.0.x. Thanks!
Comment #38
alexpottCommitted b1b8cf5 and pushed to 8.0.x and 8.1.x. Thanks!
Comment #41
gappleThis has caused a problem, since Symfony's ApcClassLoader's constructor checks
extension_loaded('apc')and throws an exception if it fails. Consequently, if APCu is installed without backwards compatibility, Drupal is unable to run and always throws the exception Unable to use ApcClassLoader as APC is not enabled. in Symfony\Component\ClassLoader\ApcClassLoader->__construct().#2646100: Exception on php7 + APCu without backwards compatibilty enabled was also created to report this issue, where I will attach a patch.