Feature #9626
Switch off autowiring for single methods via @autowiring annotation
Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Target version:
Start date:
2010-09-07
Due date:
% Done:
100%
Estimated time:
PHP Version:
Has patch:
Complexity:
Description
It would be nice to be able to switch off autowiring for certain (inject) methods and the constructor by adding an "@autowiring off" annotation to the respective method:
/** * @param Foo $foo * @autowiring off */ public function injectFoo(Foo $foo) { ... }
It should also be possible to switch off autowiring completely for the whole class by means of an @autowiring off annotation (currently that's only possible through some configuration in the Objects.yaml).
Related issues