Bug #39791
Reflection data of old aspect is not removed
Status: | New | Start date: | 2012-08-14 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Reflection | |||
Target version: | TYPO3 Flow Base Distribution - 1.1.1 | |||
PHP Version: | 5.3 | Complexity: | medium | |
Has patch: | No | Affected Flow version: | Git master |
Description
The reflection data of a removed aspect is not removed by the file monitoring / reflection framework.
Steps to reproduce:
- create something which can be advised, for example a command controller with a command
- create a new aspect which advises that command, for example with an around advice
- check that this advice works
- rename the aspect class and the class file name
- run the advised command again
Expected result:
Uncaught Exception Warning: Invalid argument supplied for foreach() in Packages/Framework/TYPO3.FLOW3/Classes/Aop/Builder/ProxyClassBuilder.php line 315
The reason for the error message is that the old aspect class name is passed to buildAspectContainer() which tries to get the class methods but, as the class does not exist anymore, continues working with an invalid result.
It doesn't seem to be the fault of the file monitoring, because the file monitor does detect the change as you can see in the log file:
12-08-14 09:39:12 4799 INFO FLOW3 Aspect classes have been modified, flushing the whole proxy classes cache. 12-08-14 09:39:12 4799 INFO FLOW3 File Monitor "FLOW3_ClassFiles" detected 1 changed files and 0 changed directories. 12-08-14 09:39:12 4799 DEBUG FLOW3 Reflected class names did not match class names to reflect 12-08-14 09:39:12 4799 DEBUG FLOW3 Reflecting class Acme\Demo\Test2Aspect 12-08-14 09:39:12 4799 INFO FLOW3 Reflected 1 emerged classes.
History
#1 Updated by Karsten Dambekalns almost 3 years ago
- Target version set to 1.1.1
#2 Updated by Karsten Dambekalns over 2 years ago
- Affected Flow version changed from Git 1.2 (master) to Git master
#3 Updated by Karsten Dambekalns over 2 years ago
- Target version changed from 1.1.1 to 2052
#4 Updated by Karsten Dambekalns almost 2 years ago
- Target version changed from 2052 to 1.1.1