Bug #47271

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

Added by Andreas Wolf over 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
AOP
Start date:
2013-04-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.4
Has patch:
No
Complexity:

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.

#1

Updated by Robert Lemke over 8 years ago

  • Target version set to 2.0.1
#2

Updated by Bastian Waidelich almost 7 years 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