[Flow] _Original classes not generated for singleton typoe classes?
Christian Loock
chl at vkf-renzel.de
Mon Oct 13 11:27:33 CEST 2014
So, I found what seems to be the issue. In
TYPO3\Flow\Object\Proxy\Compiler in the method
cacheOriginalClassFileAndProxyCode there is a regex:
$classCode = preg_replace_callback('/^([a-z
]*)(interface|class)\s+([a-zA-Z0-9_]+)/m', function($matches) use
($pathAndFilename, $classNameSuffix, $className) {
If I change this regex to also match tabs in front of the class keyword
like this:
$classCode = preg_replace_callback('/^([a-z
\t]*)(interface|class)\s+([a-zA-Z0-9_]+)/m', function($matches) use
($pathAndFilename, $classNameSuffix, $className) {
it magically works. I first thought that indenting code with tabs might
not be supported, but then I realized that all of my project is indented
with tabs, and I think this is also Flow coding standard to use tabs.
But then again, the regex is explicitly looking for alphanumerical
Characters and spaces before the class keyword if I understand the regex
correctly. This really confuses me. Any ideas?
Cheers,
Christian
Am 11.10.2014 um 13:39 schrieb Christian Müller:
> Hi Christian,
>
> it should not matter at all if the class has Scope singleton. I haven't
> seen this behavior until now. Must be something specific to your
> project. Maybe a side effect of some changes in proxy generation (which
> was changed here and there).
>
> Unfortunately I don't have a good idea how oyu could debug that.
>
> Cheers,
> Christian
>
> Christian Loock wrote:
>> Hello everyone,
>>
>> I once again encountered a weird issue. Coming back to an old flow
>> project of mine, after updating the flow version to 2.2, I get weir errors.
>>
>> Fatal error: Class
>> 'VKF\Core\Security\Authentication\AuthenticationProviderManager_Original' not
>> found in
>>
>> If i look into the generated class, it becomes clear that the _Original
>> classes is not generated. After doing a little research, I figured out,
>> that this was only happening with classes that had thei Flow\Scope set
>> to "singleton". Does anybody know if something in this regard has
>> changed in a somewhat recent update to Flow and how to solve it, without
>> making the classes prototypes?
>>
>> Cheers,
>> Chris
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
More information about the Flow
mailing list