Bug #47271

Advices for parent class' methods throw warning when called in subclass

Added by Andreas Wolf over 2 years ago. Updated 8 months ago.

Status:Closed Start date:2013-04-16
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:AOP
Target version:TYPO3 Flow Base Distribution - 2.0.1
PHP Version:5.4 Complexity:
Has patch:No Affected Flow version:Git master

Description

I have a structure with a parent class and several subclasses. I want a before advice for all set* methods of these classes.

Some methods from the parent class are invoked on objects of the subclass.
When having the advice before the set* methods, the following error occurs:

Notice: Undefined property: MyPackage\Domain\Model\MySubclass::$Flow_Aop_Proxy_targetMethodsAndGroupedAdvices in .../Data/Temporary/Development/Cache/Code/Flow_Object_Classes/MyPackage_Domain_Model_MyClass.php line 629

where MyClass is the parent class of MySubclass.

The reason seems to be that the AOP properties of a class are marked as "private", which makes them inacessible from parent (and subclass) methods. I don't know if this could/should be solved by changing the type to protected, as this might raise other issues (I'm not too deeply into the AOP code of Flow), but AFAIS this is a possible solution.

History

#1 Updated by Robert Lemke about 2 years ago

  • Target version set to 2.0.1

#2 Updated by Bastian Waidelich 8 months ago

  • Status changed from New to Closed

This ticket has been moved to https://jira.typo3.org/browse/FLOW-155

Also available in: Atom PDF