Feature #9626

Switch off autowiring for single methods via @autowiring annotation

Added by Robert Lemke about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Start date:
2010-09-07
Due date:
% Done:

100%

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

Related to TYPO3.Flow - Bug #9679: PdoHelper fails if username / password are NULL Resolved 2010-09-10

Associated revisions

Revision e8e03d9f (diff)
Added by Robert Lemke about 9 years ago

[+FEATURE] FLOW3 (Object): Control autowiring per class or method with annotations

Previously autowiring of object dependencies could only be switched on
or off for a whole class and only by configuration options in an Objects.yaml
file. Now they autowiring can be controlled per class or per single
methods by using the newly introduced @autowiring annotation.

Change-Id: Ie5e6bee228ae6cdebf3fcfab61066590190a16b5
Resolves: #9626

History

#1 Updated by Robert Lemke about 9 years ago

  • Subject changed from Switch off autowring for single methods via @autowiring annotation to Switch off autowiring for single methods via @autowiring annotation

#2 Updated by Robert Lemke about 9 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF