Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 1 addition & 2 deletions symfony/translation/3.3/config/packages/translation.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
framework:
default_locale: '%locale%'
translator:
paths:
- '%kernel.project_dir%/translations'
default_path: '%kernel.project_dir%/translations'
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure default_path works here ? IIRC, it is a Symfony 3.4+ feature, while this recipe applies to 3.3+

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but I'm following the same approach that @nicolas-grekas in the previous PR:

#416 (comment) (3.3 is EOLed so we don't really care for it)

Copy link
Member

Choose a reason for hiding this comment

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

a recipe is for new projects 99%, and no new project will use this recipe ever (or at least we don't care IMHO)

Copy link
Member

Choose a reason for hiding this comment

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

but then, it would be better to migrate this recipe to be 3.4+ and have no recipe at all for 3.3, than to have a 3.3+ recipe triggering an error on 3.3

fallbacks:
- '%locale%'
4 changes: 3 additions & 1 deletion symfony/twig-bundle/3.3/config/packages/twig.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
twig:
paths: ['%kernel.project_dir%/templates']
default_path: '%kernel.project_dir%/templates'
# additional template paths
#paths: []
Copy link
Member

Choose a reason for hiding this comment

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

@javiereguiluz can you hint when this is needed? Still feels like something we could clean :)
Any other opinion from anyone else?

Copy link
Member

Choose a reason for hiding this comment

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

In real apps I've used it 1) to add another directory where templates were defined (yes, I know, this is the obvious purpose!), 2) on symfony.com app I use it to define Twig namespaces, 3) in some personal apps I use it to add public/static/images/ as a directory for templates. Why? Because that way I can use the SVG icons as regular images in SCSS and embed them in Twig templates with {{ source('icons/-------.svg') }}

But again, if most people never change this option, let's remove it from the default config file. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Going back to the simpleness version, anyway it's well documented.

debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'