Skip to content

Definition conflict when setting a value for a class name #70

@mnapoli

Description

@mnapoli
$container->set('Doctrine\ORM\EntityManager', $entityManager);

This will cause a problem because when the container will "getDefinition", there will be 2 incompatible definitions:

  • Doctrine\ORM\EntityManager class using Reflection -> ClassDefinition
  • $entityManager instance -> ValueDefinition

The solution would be that when a ValueDefinition exists, all other definitions are ignored.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions