-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix race condition where ComponentTemplateParser.php.inc can be loaded instead of ComponentTemplateParser.php, causing the custom template code to not work. #13
Comments
silbinarywolf
added a commit
that referenced
this issue
May 19, 2018
…teParser.php.inc can be loaded instead of ComponentTemplateParser.php, causing the custom template code to not work. - Github Issue #13
silbinarywolf
added a commit
that referenced
this issue
May 19, 2018
…teParser.php.inc can be loaded instead of ComponentTemplateParser.php, causing the custom template code to not work. - Github Issue #13
silbinarywolf
added a commit
that referenced
this issue
May 19, 2018
…teParser.php.inc can be loaded instead of ComponentTemplateParser.php, causing the custom template code to not work. - Github Issue #13
silbinarywolf
added a commit
that referenced
this issue
May 19, 2018
…teParser.php.inc can be loaded instead of ComponentTemplateParser.php, causing the custom template code to not work. - Github Issue #13
silbinarywolf
added a commit
that referenced
this issue
May 19, 2018
…teParser.php.inc can be loaded instead of ComponentTemplateParser.php, causing the custom template code to not work. - Github Issue #13
This is now fixed in:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
The class manifest is scanning the module directory for classes. However it seems that it's scanning both
ComponentTemplateParser.php
andComponentTemplateParser.php.inc
(used to generate *.php version).It will sometimes use that class instead of the generated class, causing templates to not load/work properly. This can result in
ArrayData
/SS_List
callingforTemplate()
errors in a way that's incredibly hard to debug.EDIT: It seems whats happening is the PSR-4 autoload of Composer is picking up the
.php.inc
file. The SilverStripe class manifest scanner only works on *.php files.The solution
Rename
ComposerTemplateParser.php.inc
toComposerTemplateParser.peg
. This is what SilverStripe 4+ does and this should stop the ClassManifest from picking up the file..gitattributes also needs to be updated to ignore exporting the newly renamed *.peg file.
Affected versions
The text was updated successfully, but these errors were encountered: