EdpSuperluminal icon indicating copy to clipboard operation
EdpSuperluminal copied to clipboard

Breaks with ZF 2.5+

Open tasmaniski opened this issue 8 years ago • 5 comments

the file is created /cache/classes.php.cache, but every request got error

PHP message: PHP Fatal error: Interface 'Interop\Container\ContainerInterface' not found

tasmaniski avatar Apr 28 '16 14:04 tasmaniski

What's Interop? AFAIK, Superluminal will only cache classes in the Zend namespace.

dkmuir avatar May 02 '16 06:05 dkmuir

Yes, that is the bug. zend-servicemanager depend on "container-interop/container-interop" package. So it's not cached, but EdpSuperluminal try to get it. Do you have an idea how to overcome this case?

tasmaniski avatar May 04 '16 07:05 tasmaniski

Hmm, but if the class is not in classes.php.cache, it should autoload. I keep having issues where the interfaces are included after implementing class, so the autoloader loads the interface, then blows up when it finds the interface a 2nd time in the cache. See issue #16. You can try modifying Module.php line 54 to include classes starting with Interop to see if it helps.

dkmuir avatar May 04 '16 23:05 dkmuir

@dkmuir and @tasmaniski

I have a same problem. How did they solve it?

guilherme90 avatar Aug 08 '17 11:08 guilherme90

Adicionei isso no Module.php na linha 54

// Skip non-Interop classes if (0 !== strpos($class, 'Interop')) { continue; } E funcionou muito bem para a versão ZF 2.5.3

ronaldormelo avatar Mar 14 '19 19:03 ronaldormelo