Skip to content

@Injects annotation conflicts with other annotations #124

@mnapoli

Description

@mnapoli

Example:

/**
 * @expectedException
 */
public function testFooBar() {
    ...
}

Trying to use @Inject on a file containing such annotations will cause an error. This is because Doctrine's annotation reader tries to read ALL annotations in the file.

There is now a SimpleAnnotationReader that allows to read only specific annotations, so that's a solution.

Furthermore, this alternate reader makes the import (use DI\Annotation\Inject) optional, which is awesome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions