Closed demiankatz closed 6 years ago
@Xerkus, I received a notification that you had left a comment here, but I no longer see it. Does that mean you were able to reproduce the problem successfully?
Yes, I made wrong test case at first https://3v4l.org/h8MEs
Thanks!
Thanks, @demiankatz
ServiceManager v2 supported configuring factories to callable strings of the form
'Class::Method'
, as a concise alternative to['Class', 'Method']
.ServiceManager v3 continues to support this for PHP 7, but for some reason, the feature breaks in PHP 5.6.
This pull request includes a possible fix as well as a test that demonstrates the problem; without my proposed code changes to the ServiceManager, the test dies with a fatal error in PHP 5.6, but passes in PHP 7.
If there is a more elegant solution, I would welcome feedback. If this support is being dropped intentionally, we should at least find a way to fail more gracefully.