Skip to content

Added a tip about versioning when using Flex #10190

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 3 commits into from
Closed
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions frontend/encore/versioning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ in your ``script`` and ``link`` tags. If you're using Symfony, just activate the
# feature is supported in Symfony 3.3 and higher
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'

.. tip::

If your project uses Symfony Flex, a file called ``assets.yaml`` is created upon installation of Webpack Encore containing the lines above, so you don't have to manually add them to ``framework.yaml``.

Copy link
Member

Choose a reason for hiding this comment

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

What if we assume the user is using Flex (that's the general policy on the 4.0+ docs). We could:

A) Update the filename in code block above to be assets.yaml
B) Add a comment at the top of the code block:

This file is added automatically when installing Encore with Symfony Flex

Then we can remove this extra tip :). WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you are right, that makes more sense! I've applied the changes, I also took a look at comments in other YAML files in the docs and it seems that most of them start with a lowercase letter and no blank lines between them, you think it's okay like this?

That's it! Just be sure to wrap each path in the Twig ``asset()`` function
like normal:

Expand Down