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

[Workflow] Move twig extension registration to twig bundle #22652

Merged
merged 1 commit into from May 8, 2017
Merged

[Workflow] Move twig extension registration to twig bundle #22652

merged 1 commit into from May 8, 2017

Conversation

ogizanagi
Copy link
Member

@ogizanagi ogizanagi commented May 6, 2017

Q A
Branch? 3.2
Bug fix? not really
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

It's probably very late, but I think the twig extension registration is supposed to be done from the TwigBundle rather than the FrameworkBundle. Fortunately, it doesn't cause any issue currently when using the framework bundle and the workflow component without twig, because it only creates a workflow.twig_extension service you'll probably never call, and the twig.extension tag is never processed. But still, creates a useless service that cannot be called (and is not removed because it's public).

So this PR aims for consistency over other twig extensions registration, and removing this service when not using twig.
It isn't a BC break to me, as you usually already use the TwigBundle for other extensions.

fabpot added a commit that referenced this pull request May 8, 2017
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] fix use directives

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

Spotted while creating #22652

Commits
-------

08f4ad2 [Workflow] fix use directives
@fabpot
Copy link
Member

fabpot commented May 8, 2017

Thank you @ogizanagi.

@fabpot fabpot merged commit 3fc80d1 into symfony:3.2 May 8, 2017
fabpot added a commit that referenced this pull request May 8, 2017
… (ogizanagi)

This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Move twig extension registration to twig bundle

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | not really
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

It's probably very late, but I think the twig extension registration is supposed to be done from the `TwigBundle` rather than the `FrameworkBundle`. Fortunately, it doesn't cause any issue currently when using the framework bundle and the workflow component without twig, because it only creates a `workflow.twig_extension` service you'll probably never call, and the `twig.extension` tag is never processed. But still, creates a useless service that cannot be called (and is not removed because it's public).

So this PR aims for consistency over other twig extensions registration, and removing this service when not using twig.
It isn't a BC break to me, as you usually already use the `TwigBundle` for other extensions.

Commits
-------

3fc80d1 [Workflow] Move twig extension registration to twig bundle
@ogizanagi ogizanagi deleted the mv_workflow_twig_ext_di_def branch May 8, 2017 17:04
@fabpot fabpot mentioned this pull request May 17, 2017
@fabpot fabpot mentioned this pull request May 29, 2017
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.

None yet

3 participants