Skip to content

bug: PHP-DI doesn't support factories with magic methods #67

@defaultpage

Description

@defaultpage

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:

  1. Create project of Mezzio with PHP-DI container
  2. Add current library into the project
  3. Try to dispatch a command
  4. See error

Version of the xtreamwayz/psr-container-messenger library
2.5.0

Expected behavior
Command successfully dispatched.

How to fix it for yourself
Use custom configuration entries for the factories or custom ConfigProvider

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions