Skip to content

Warning: SplObjectStorage::contains() expects parameter 1 to be object, null given in ....JMS/DebuggingBundle/DependencyInjection/TraceableContainer.php line 71 #70

@jeremymoore

Description

@jeremymoore

After installing I immediately received this error on my project. After a little debugging I was able to trace this back to a Factory service. The factory service is defined as follows and the service id that returns null when $service = parent::get($id, $invalid); is called is some_factory_service. When JMSDebuggingBundle is not installed everything works fine, so I'm not sure if this is just a specific problem to factory services or something else.

Any ideas? Thanks!

  app.some_factory: 
    class: App\SomeBundle\Factory\SomeFactory
    arguments: 
      - "@some_service"
      - "@another_service"

  some_factory_service: 
    class: App\SomeBundle\Entity\SomeEntity
    factory_service: app.some_factory
    factory_method: get

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions