Skip to content

[#9135] some minor tweaks #9160

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
Jan 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions reference/dic_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1071,12 +1071,13 @@ the service is auto-registered and auto-tagged. But, you can also register it ma
$container
->register(AppExtension::class)
->addTag('twig.extension')

;
$container
Copy link
Member Author

Choose a reason for hiding this comment

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

addTag() returns the Definition instance itself, but we need the ContainerBuilder to call register()

->register(AnotherExtension::class)
->addTag('twig.extension', array('priority' => -100))
;

.. versionadded::
.. versionadded:: 4.1
Copy link
Member Author

Choose a reason for hiding this comment

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

the version number is needed for the versionadded block to be rendered correctly

The ``priority`` attribute of the ``twig.extension`` tag was introduced in
Symfony 4.1.

Expand Down