Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Injects annotation conflicts with other annotations #124

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

@Injects annotation conflicts with other annotations #124

mnapoli opened this issue Oct 11, 2013 · 1 comment
Labels

Comments

@mnapoli
Copy link
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
…ting the Inject annotation is now optional!
mnapoli added a commit that referenced this issue Oct 11, 2013
@mnapoli
Copy link
Member Author

mnapoli commented Oct 11, 2013

Fixed in 3.5

@mnapoli mnapoli closed this as completed Oct 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant