Bug #2558

Property Injection doesn't work with subclasses

Added by Robert Lemke over 6 years ago. Updated almost 5 years ago.

Status:Closed Start date:2009-02-04
Priority:Must have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Object
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 1
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

A property flagged for property injection will only be injected in the class it has been defined, not in one of the subclasses:

class Foo {

   /**
    * @var Baz
    * @inject
    */
   protected $baz;
}

class Bar extends Foo {

   public function doSomething() {
      $this->baz->doSomething()
   }
}

... will result in a fatal error because $this->baz is not defined.

History

#1 Updated by Karsten Dambekalns over 6 years ago

  • Status changed from New to Accepted
  • Assigned To changed from Robert Lemke to Karsten Dambekalns

#2 Updated by Karsten Dambekalns over 6 years ago

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

No change required, works as expected.

Also available in: Atom PDF