Open JPG-Consulting opened 8 years ago
However GlobalEventManager is not available since version 2.6 of the EventManager and therefor causes problems with version 3.
Could you provide an error message? (or put another way: how do you know it isn't working?)
This aliasing "trick" works and is tested in the CI system against both EMv3 and EMv3, The Validator Chain has separate implementations for EMv2 and EMv3 (AbstractValidatorChainEM2
and AbstractValidatorChainEM3
, respectively) and the FQCN Zend\Session\AbstractValidatorChain
is aliased to the appropriate one at runtime based on which version of EM you have installed. When using EMv3 the class_exists
call will return false (since the class doesn't exist) and so the else block will be executed, aliasing the AbstractValidatorChain
class name to the EMv3 implementation (AbstractValidatorChainEM3
).
This repository has been closed and moved to laminas/laminas-session; a new issue has been opened at https://github.com/laminas/laminas-session/issues/12.
In
ValidatorChain.php
:However
GlobalEventManager
is not available since version 2.6 of the EventManager and therefor causes problems with version 3.PHP 5.6 running on WAMP Server.
I don't know if this happens all the time, guess it will... What I've done is NOT loading the module and initialize the session manager by hand:
It will cause the error due to the missing
GlobalEventManager
class and if you bring the class from version 2.6 then the next reported error comes allong due to the missingcallable
declaration inAbstractValidatorChainEM2::attach
method.