Bug #47309
Calling this in static context in cached classes
Status: | Closed | Start date: | 2013-04-17 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | TYPO3 Flow Base Distribution - 2.0 | |||
PHP Version: | 5.3 | Complexity: | ||
Has patch: | No | Affected Flow version: | Git 2.0 |
Description
When updating TYPO3 Flow 2.0 to the newest commit there is an Fatal error calling $this in static context.
For example the function "static public function getActionMethodParameters" is calling $this inside it's function.
After bisecting with git I found out that the problem is in 6d56d5f7
Running on the commit before this merge TYPO3 Flow is working.
Related issues
History
#1 Updated by Alexander Berl over 2 years ago
Can't reproduce that with a fresh checkout from master and I also find no problematic code in that changeset on the first look. Could it be some commit merge problem? Can you possibly provide more debug information? For example a paste of the compiled proxy for TYPO3_Flow_Mvc_Controller_ActionController in your Data\Temporary\{Context}\Cache\Code\Flow_Object_Classes folder, the system log and the exact error message.
#2 Updated by Steffen Ritter over 2 years ago
Hey Wouter,
had that too - and this is because you use AOP with an advice catching all methods in a class.
College of mine did an "afterThrowing" to .*Controller->.*()
This wraps AOP Code around EVERY method within the controller - even static functions which won't work.
Why this "suddenly" happened is because of the introduced compile static performance optimisation which introduced static methods.
#3 Updated by Benno Weinzierl over 2 years ago
Is just stubled across the same problem. Be aware that also Policies are enforced through AOP wich make rules like this impossible:
'method(S2\Shop\Frontend\Controller\CheckoutController->.*(.*))'
i used
'method(S2\Shop\Frontend\Controller\CheckoutController->.*Action(.*))'
instead
#4 Updated by Robert Lemke over 2 years ago
- Status changed from New to Closed
- Target version set to 2.0
Solved in #47371