Skip to content

Removed a short article about overriding bundle templates #9936

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

Closed
wants to merge 4 commits into from

Conversation

javiereguiluz
Copy link
Member

Spotted while fixing #9923.

@stof I have a question for you. I left this caution but I don't know if it's still needed:

.. caution::

    If you add a template in a new location, you *may* need to clear your
    cache (``php bin/console cache:clear``), even if you are in debug mode.

I tested in a Symfony 4 app. If I add a new template in my app, there's no need to clear the cache in dev. Does this caution only applies when adding new templates to override bundles? Or is it something no longer relevant in Symfony 4? Thanks!

templating.rst Outdated
by placing a template of the same name in the ``templates/bundles/AcmeBlogBundle/``
directory. This gives the power to override templates from any vendor bundle.
Using this namespaced syntax instead of their real file paths to refer to bundle
templates is part of the bundle overriding mechanism. This allows applications
Copy link
Contributor

Choose a reason for hiding this comment

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

This part is not exact, but do we care? bundle overriding mechanism => Twig overriding mechanism

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right! I've reworded it.

Copy link
Contributor

@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

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

👌

javiereguiluz added a commit that referenced this pull request Jun 20, 2018
… (javiereguiluz)

This PR was squashed before being merged into the 4.0 branch (closes #9936).

Discussion
----------

Removed a short article about overriding bundle templates

Spotted while fixing #9923.

@stof I have a question for you. I left this caution but I don't know if it's still needed:

```rst
.. caution::

    If you add a template in a new location, you *may* need to clear your
    cache (``php bin/console cache:clear``), even if you are in debug mode.
```

I tested in a Symfony 4 app. If I add a new template in my app, there's no need to clear the cache in `dev`. Does this caution only applies when adding new templates to override bundles? Or is it something no longer relevant in Symfony 4? Thanks!

Commits
-------

44a33a4 Removed a short article about overriding bundle templates
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.

3 participants