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

Skip to content

FileLocator service definition update: look for templates in /templates directory instead of deprecated /src/Resources #29262

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 1 commit into from

Conversation

domnuprofesor
Copy link

Q A
Branch? master for features / 2.8 up to 4.1 for bug fixes
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT
Doc PR symfony/symfony-docs#...

…es directory instead of deprecated /src/Resources
@nicolas-grekas
Copy link
Member

@yceruto maybe for review?

@yceruto
Copy link
Member

yceruto commented Nov 20, 2018

I don't have much information.

@domnuprofesor could you explain what's the issue are you faced?

@yceruto
Copy link
Member

yceruto commented Nov 20, 2018

Maybe related to #25811 (comment)

@@ -48,7 +48,7 @@

<service id="file_locator" class="Symfony\Component\HttpKernel\Config\FileLocator">
<argument type="service" id="kernel" />
<argument>%kernel.root_dir%/Resources</argument>
<argument>%kernel.root_dir%/../templates</argument>
Copy link
Member

@chalasr chalasr Nov 20, 2018

Choose a reason for hiding this comment

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

The fact it is %kernel.root_dir%/Resources and not %kernel.root_dir%/Resources/views hints that FileLocator is not only about locating templates but any resource (see class and interface description), replacing this path by templates does not look right to me.
Also making FileLocator suddenly stop being able to locate resources from the deprecated path is not good regarding BC, using it for such resources should trigger a deprecation notice first.
We could also need to deprecate this argument at the class level before 5.0 since there is no global Resources directory anymore (directories previously stored in the app/Resources folder are now first-level dirs like /templates and /translations), and kernel.root_dir won't exist anymore in 5.0.

@nicolas-grekas nicolas-grekas added this to the next milestone Nov 22, 2018
@fabpot
Copy link
Member

fabpot commented Mar 4, 2019

Closing as per @chalasr's comment.

@fabpot fabpot closed this Mar 4, 2019
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
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.

6 participants