You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If someone uses mezzio + PHP-DI, they will receive an error MessageBusFactory::messenger.command.bus() is not a callable. A __call() or __callStatic() method exists but magic methods are not supported.
PHP-DI uses PHP-DI/Invoker.
To Reproduce
Steps to reproduce the behavior:
Create project of Mezzio with PHP-DI container
Add current library into the project
Try to dispatch a command
See error
Version of the xtreamwayz/psr-container-messenger library
2.5.0
How to fix it for yourself
Use custom configuration entries for the factories or custom ConfigProvider
The text was updated successfully, but these errors were encountered:
defaultpage
changed the title
bug: PHP-DI and PHP-DI/Invoker doesn't support factories with magic methods
bug: PHP-DI doesn't support factories with magic methods
Aug 10, 2021
Hi @artemmolotov. First of all, it's good to see that mezzio is used with other containers than laminas-servicemanager. To be honest, I have never tried this with something else. This is certainly something that could be improved. I have no idea how to do this yet as the feature that the servicemanager provides makes configuration in such way pretty easy. But I agree that using custom configuration is not a user friendly way to use this library.
Describe the bug
If someone uses mezzio + PHP-DI, they will receive an error
MessageBusFactory::messenger.command.bus() is not a callable. A __call() or __callStatic() method exists but magic methods are not supported
.PHP-DI uses PHP-DI/Invoker.
To Reproduce
Steps to reproduce the behavior:
Version of the
xtreamwayz/psr-container-messenger
library2.5.0
Expected behavior
Command successfully dispatched.
How to fix it for yourself
Use custom configuration entries for the factories or custom ConfigProvider
The text was updated successfully, but these errors were encountered: