Support autowiring for Doctrine\Common\Annotations\Reader#17782
Support autowiring for Doctrine\Common\Annotations\Reader#17782fabpot merged 1 commit intosymfony:masterfrom maryo:annotation_reader_autowiring
Conversation
|
ping @dunglas |
|
Looks good to me. @maryo did you tested it? Btw, we need to add some functional tests for this set of rules. |
|
@dunglas Yes. I tested it manually. I'll see if I can provide some functional tests. |
|
👍 |
|
|
||
| use Doctrine\Common\Annotations\Reader; | ||
|
|
||
| class AnnotationReader |
There was a problem hiding this comment.
Maybe can we create one test class where we will inject all services having an autowiring_type entry in their definition?
It will ease adding tests for others autowired services.
There was a problem hiding this comment.
I had the same idea, just wasn't sure if having many arguments in the future is not too controversial and I was also wondering about the name of the class (but the current name AnnotationReader is maybe also not the best choice) :)... So should I do it?
There was a problem hiding this comment.
For me it's ok, it's a test class. For the name, what about Foo?
There was a problem hiding this comment.
@dunglas I've renamed it to AutowiredServices. One can add an argument to the constructor for testing another service and test it in the AutowiringTypesTest. Foo seemed too generic in this case to me. But feel free to rename it or let me know. I was also not sure about the namespace so i kept AutowiringTypes.
|
Thank you @maryo. |
…der (maryo) This PR was merged into the 3.1-dev branch. Discussion ---------- Support autowiring for Doctrine\Common\Annotations\Reader | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a I've added support for autowiring based on `Doctrine\Common\Annotations\Reader` interface simmilar to https://github.com/symfony/symfony/pull/17703/files The `annotations.cached_reader` service is injected when cache is enabled. Commits ------- b325f9c Support autowiring for Doctrine\Common\Annotations\Reader
I've added support for autowiring based on
Doctrine\Common\Annotations\Readerinterface simmilar to https://github.com/symfony/symfony/pull/17703/filesThe
annotations.cached_readerservice is injected when cache is enabled.