Skip to content
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

engine-twig-php: include-function syntax not matched by findPartials #1471

Closed
hadl opened this issue Jan 15, 2023 · 2 comments · Fixed by #1472 or #1473
Closed

engine-twig-php: include-function syntax not matched by findPartials #1471

hadl opened this issue Jan 15, 2023 · 2 comments · Fixed by #1472 or #1473
Labels
twig renderer Issues and updates related to the PHP-based Twig rendering engine

Comments

@hadl
Copy link
Contributor

hadl commented Jan 15, 2023

I am using Pattern Lab Node v5.17.0 on Mac, with Node v16.18.1, using a Vanilla Edition.

Expected Behavior

As of Twig 1.12, it is recommended to use the include function instead as it provides the same features with a bit more flexibility.

Patternlab should find these includes too and show them in the linage information of a pattern.

Actual Behavior

Patternlab Engine Twig PHP findPartials regex does not match the include-function syntax.
With that the linage is not found / shown and patterns are not updated correctly when using incremental builds.

@mfranzke
Copy link
Contributor

mfranzke commented Jan 15, 2023

@hadl thanks a lot for reporting this. Do you have the chance to provide a PR with necessary code changes as well ?

@mfranzke mfranzke added the twig renderer Issues and updates related to the PHP-based Twig rendering engine label Jan 15, 2023
hadl added a commit to hadl/patternlab-node that referenced this issue Jan 15, 2023
hadl added a commit to hadl/patternlab-node that referenced this issue Jan 15, 2023
@hadl
Copy link
Contributor Author

hadl commented Jan 15, 2023

@mfranzke i have separated my fixes to two PRs cause of the bigger change in engine-twig.

I have recognized that the rendering of the "html" in engine-twig is not up-to-date with the twig template, but i could not find the issue causing that.
Maybe you could quickly double-check that or give me a hint what the cause of that could be?
It does not affect my use of engine-twig-php but maybe it is for others.

JosefBredereck added a commit that referenced this issue Jan 30, 2023
…tials (#1473)

Closes: #1471

Co-authored-by: Josef Bredreck <13408112+JosefBredereck@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
twig renderer Issues and updates related to the PHP-based Twig rendering engine
Projects
None yet
2 participants