Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[TwigBundle][DX] Only add the Twig WebLinkExtension if the WebLink component is enabled#27626
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| returnfalse; | ||
| } | ||
| if (\class_exists(FullStack::class) &&'web-link' ===self::$functionComponents[$name]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
what about other components needing to be enabled ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
For the other functions/filters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
yeah, you add a special error message for the full stack case here when forgetting to enable a component (while the previous error message was for the non-fullstack case to tell to install a package). But web-link is not the only component needing to be enabled explicitly in a fullstack project. If we start to handled this case with nicer error messages, we should do it for all components, not only for one.
| 'security-core' =>'add the "SecurityBundle"', | ||
| 'security-http' =>'add the "SecurityBundle"', | ||
| 'web-link' =>'enable "framework.web_link"', | ||
| 'workflow' =>'enable "framework.workflows"', |
thewilkybarkidJun 20, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ithink these are right, and the only ones effected.
fabpot commentedJun 25, 2018
Thank you@thewilkybarkid. |
… WebLink component is enabled (thewilkybarkid)This PR was squashed before being merged into the 3.4 branch (closes#27626).Discussion----------[TwigBundle][DX] Only add the Twig WebLinkExtension if the WebLink component is enabled| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |While addingelifesciences/journal#990 I was a bit confused why the `preload()` Twig function didn't work initially. Turns out the WebLink component is disabled by default if using the full stack, but the Twig extension is always enabled.This only adds the Twig extension if the component is enabled, and shows a friendly error message if it's not.Commits-------cccb66f [TwigBundle][DX] Only add the Twig WebLinkExtension if the WebLink component is enabled
While addingelifesciences/journal#990 I was a bit confused why the
preload()Twig function didn't work initially. Turns out the WebLink component is disabled by default if using the full stack, but the Twig extension is always enabled.This only adds the Twig extension if the component is enabled, and shows a friendly error message if it's not.