8000 [FrameworkBundle] Enable assets with templates only if the Asset component is installed by hason · Pull Request #24172 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Enable assets with templates only if the Asset component is installed #24172

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

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

hason
Copy link
Contributor
@hason hason commented Sep 12, 2017
Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR -

@nicolas-grekas
Copy link
Member

could it make sense to merge this in 3.3?

@@ -52,7 +52,7 @@ public function getConfigTreeBuilder()

$rootNode
->beforeNormalization()
->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']); })
->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']) && class_exists(Package::class); })
Copy link
Contributor

Choose a reason for hiding this comment

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

How about moving the class check at the start of the condition ? (Yes that's kind of a micro-optimization...)

Copy link
Member

Choose a reason for hiding this comment

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

calling a function last is the best it terms of µoptim to me

@fabpot
Copy link
Member
fabpot commented Sep 27, 2017

Thank you @hason.

@fabpot fabpot merged commit 5bc0b05 into symfony:3.4 Sep 27, 2017
fabpot added a commit that referenced this pull request Sep 27, 2017
…he Asset component is installed (hason)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Enable assets with templates only if the Asset component is installed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | -

Commits
-------

5bc0b05 [FrameworkBundle] Enable assets with templates only if the Asset component is installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0