EvanDotPro/EdpSuperluminal

Broken in beta 3

RWOverdijk opened this issue · 3 comments

I've just tried to use this module in beta 3, and it appears to be breaking. I did exactly what the installation steps suggested:

<?php
chdir(dirname(__DIR__));

require_once (getenv('ZF2_PATH') ?: 'vendor/ZendFramework/library') . '/Zend/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory();

define('ZF_CLASS_CACHE', 'data/cache/classes.php.cache');
if (file_exists(ZF_CLASS_CACHE)) require_once ZF_CLASS_CACHE;

//...

Running it the first time seems to not produce any errors (as the classes are being loaded regularly), though the second time it gives me an exception:

Fatal error: Cannot redeclare class Zend\Loader\SplAutoloader in /mypath/data/cache/classes.php.cache on line 4

This does make sense seeing how we're including the autoloaderfactory, and then the classes cache file.

Why don't you don't move the

require_once ZF_CLASS_CACHE;

call above the autoloader?

Because that doesn't solve the issue for me.

I've updated this module and the readme for beta5. Please see if your problems have been resolved.