Skip to content

Conversation

@haidubogdan
Copy link
Contributor

@haidubogdan haidubogdan commented Aug 24, 2025

This is a pull request to fix Twig 3.15 inline comments. (#8100)

Before :

image

After:

image

It is not a perfect solution as the following snippet will be seen as normal.

{{ "Hello World"|upper # this is an inline comment }}
image

This snippet will trigger a parser error on a real usage.
Unfortunately, the fix for this is more complex and can take more time as it is done on twig top lexer.
I need to check if the "#" symbol is in string or not, if it will finish with a new line or not, for which I sense that jflex lexer has some limitations and the current logic is hard to adapt.

@troizet troizet added the PHP [ci] enable extra PHP tests (php/php.editor) label Aug 24, 2025
@mbien mbien linked an issue Aug 25, 2025 that may be closed by this pull request
@troizet troizet requested review from junichi11 and tmysik August 25, 2025 02:45
Copy link
Member

@tmysik tmysik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you.

@apache apache locked and limited conversation to collaborators Sep 2, 2025
@apache apache unlocked this conversation Sep 2, 2025
@matthiasblaesing
Copy link
Contributor

@haidubogdan could you please update the author information of the commit with your full name? I agree with @tmysik that this is good to go, but the author information should be complete first. Thank you.

@haidubogdan haidubogdan force-pushed the t_8100_php_twig_inline_comment_coloring branch from b1c38e9 to cce14b8 Compare September 3, 2025 19:45
@haidubogdan
Copy link
Contributor Author

Hi @matthiasblaesing , done, I've updated the Author of the commit.

@matthiasblaesing matthiasblaesing added this to the NB28 milestone Sep 5, 2025
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@matthiasblaesing matthiasblaesing merged commit 615dfc8 into apache:master Sep 5, 2025
31 checks passed
@haidubogdan haidubogdan deleted the t_8100_php_twig_inline_comment_coloring branch October 9, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP [ci] enable extra PHP tests (php/php.editor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Twig 3.15 inline comments

4 participants