@Injects annotation conflicts with other annotations #124

Closed
mnapoli opened this Issue Oct 11, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@mnapoli
Member

mnapoli commented Oct 11, 2013

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.

mnapoli added a commit that referenced this issue Oct 11, 2013

#124 Other annotations doesn't cause errors in PHP-DI anymore + impo…
…rting the Inject annotation is now optional!

mnapoli added a commit that referenced this issue Oct 11, 2013

@mnapoli

This comment has been minimized.

Show comment
Hide comment
@mnapoli

mnapoli Oct 11, 2013

Member

Fixed in 3.5

Member

mnapoli commented Oct 11, 2013

Fixed in 3.5

@mnapoli mnapoli closed this Oct 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment