-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
The use statement imports \ArrayObject as PhpArrayObject so we need to use it here. In other case it will use of undefined constant.
Actually it uses the ArrayObject in the Zend\Stdlib namesapce which handles legacy comparability. |
Oops. This was wrong, the code was good. ArrayObject is hacked for to have the same API along different PHP versions. Reverting. |
Shouldn't it be |
The imported one is aliases PhpArrayObject as it would conflict with the ArrayObject that already exists in the current namespace. The ArrayObject in the current namespace fixes issues between different versions of PHP. |
Sorry it is my error, I should check the current namespace for ArrayObject first. |
But anyway the using of PhpArrayObject::ARRAY_AS_PROPS should not break anything, it will refer to \Zend\Stdlib\ArrayObject then, right? Then fix can be right. |
@hinikato ArrayObject is a class created (aliased) at runtime.https://github.com/zendframework/zf2/blob/master/library/Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php#L37 |
This reverts commit 29443bdadc884ef747b37143cf95b68d993f4f9c, reversing changes made to 17779c3c29680be0a4fa401ca355a7e9de24c6c0.
This reverts commit 87531698e7ef1cf3f6994cc8b8e35eb77c9636c0, reversing changes made to f976d54b423ca669e906a09e019ae2979ac007b4.
The use statement imports \ArrayObject as PhpArrayObject so we need to use it here. In other case it will use of undefined constant.