Skip to content

Fix Blade compilation error in guidelines by escaping Antlers syntax#20

Open
darinlarimore wants to merge 1 commit intochrisvasey:mainfrom
darinlarimore:fix/escape-antlers-in-blade-guidelines
Open

Fix Blade compilation error in guidelines by escaping Antlers syntax#20
darinlarimore wants to merge 1 commit intochrisvasey:mainfrom
darinlarimore:fix/escape-antlers-in-blade-guidelines

Conversation

@darinlarimore
Copy link
Copy Markdown

Summary

  • The core.blade.php guideline file contains Antlers template examples using {{ }} syntax, which Blade's compiler interprets as PHP echo statements
  • Running boost:install --guidelines (or boost:install without flags) throws a ParseError: syntax error, unexpected identifier "limit", expecting ")" because Blade tries to compile {{ collection:blog limit="5" }} as PHP
  • Fixed by prefixing all {{ }} occurrences with @ so Blade outputs them as literal text

Error reproduced

Illuminate\View\ViewException

syntax error, unexpected identifier "limit", expecting ")"
(View: .../vendor/chrisvasey/statamic-boost/resources/boost/guidelines/core.blade.php)

➜  30▕ <?php echo e(collection:blog limit="5"); ?>

Test plan

  • Run php artisan boost:install --guidelines and confirm it completes without error
  • Verify the generated guidelines output contains the correct Antlers syntax examples (without @ prefix in the final output)

🤖 Generated with Claude Code

The core.blade.php guideline file contains Antlers template examples
using {{ }} syntax, which Blade's compiler interprets as PHP echo
statements, causing a ParseError during `boost:install --guidelines`.

Prefix all {{ }} occurrences with @ so Blade outputs them as literal
text instead of trying to compile them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@junioradwise
Copy link
Copy Markdown

I tested this and this solves the issue i raised in: #22

@podrabinek
Copy link
Copy Markdown

I need this fix too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants