Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:3.4fromthewilkybarkid:twig-web-link
Jun 25, 2018

Conversation

@thewilkybarkid
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

While addingelifesciences/journal#990 I was a bit confused why thepreload() 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.

@carsonbotcarsonbot added Status: Needs Review TwigBundle DXDX = Developer eXperience (anything that improves the experience of using Symfony) Bug labelsJun 18, 2018
@nicolas-grekasnicolas-grekas added this to the3.4 milestoneJun 19, 2018
returnfalse;
}

if (\class_exists(FullStack::class) &&'web-link' ===self::$functionComponents[$name]) {
Copy link
Member

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 ?

Copy link
ContributorAuthor

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?

Copy link
Member

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"',
Copy link
ContributorAuthor

@thewilkybarkidthewilkybarkidJun 20, 2018
edited
Loading

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
Copy link
Member

Thank you@thewilkybarkid.

@fabpotfabpot merged commitcccb66f intosymfony:3.4Jun 25, 2018
fabpot added a commit that referenced this pull requestJun 25, 2018
… 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
@thewilkybarkidthewilkybarkid deleted the twig-web-link branchJune 25, 2018 11:36
This was referencedJun 25, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Labels

BugDXDX = Developer eXperience (anything that improves the experience of using Symfony)Status: ReviewedTwigBundle

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@thewilkybarkid@fabpot@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp