Reflection data of old aspect is not removed
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
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.