Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Bad prototype #74

Closed
remicollet opened this issue May 2, 2017 · 9 comments
Closed

Bad prototype #74

remicollet opened this issue May 2, 2017 · 9 comments
Labels

Comments

@remicollet
Copy link

Running zend-test test suite against php 7.2

PHP Fatal error: Declaration of Zend\Session\AbstractContainer::offsetGet($key) must be compatible with & Zend\Stdlib\ArrayObject::offsetGet($key) in ...

Indeed in Zend/Stdlib/ArrayObject.php
public function &offsetGet($key)

and in Zend/Session/AbstractContainer.php
public function offsetGet($key)

yes, really early report ;)

@Ocramius
Copy link
Member

Ocramius commented May 2, 2017

@remicollet isn't this technically a BC break in PHP 7.2? Did the signature change recently, or is the engine just being more strict about it?

@Ocramius Ocramius added the bug label May 2, 2017
@remicollet
Copy link
Author

Did the signature change recently, or is the engine just being more strict about it?

Yes the engine is more strict in 7.2
Technically, you could consider this as a small BC break, BTW, prototype are "really" different, so IMHO, better to report.

@Ocramius
Copy link
Member

Ocramius commented May 2, 2017

CC-ing in also @saramg: this is a subtle BC break.
While it is worth fixing it here, and it will be fixed, this can be extremely annoying to deal with, and should probably be put into discussion for 7.2...

@Ocramius
Copy link
Member

Ocramius commented May 2, 2017

CC-ing in also @sgolemon: this is a subtle BC break.
While it is worth fixing it here, and it will be fixed, this can be extremely annoying to deal with, and should probably be put into discussion for 7.2...

@sgolemon
Copy link

You're always welcome to reopen the discussion (I say reopen, because this kind of BC break was discussed and accepted as reasonable). However IMO ZF is broken here and should reflect upon its life choices.

@Slamdunk
Copy link
Contributor

#78

@weierophinney
Copy link
Member

This is fixed with the 2.8.0 release.

@ghost
Copy link

ghost commented Aug 14, 2018

I put "&" at offsetGet function and found for me:

//Zend/Session/AbstractContainer.php line 425
public function &offsetGet($key)

@sumtsow
Copy link

sumtsow commented Feb 27, 2019

Perfect!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants