8000 Wrong deprecation message related to PHP templates · Issue #30088 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Wrong deprecation message related to PHP templates #30088

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
javiereguiluz opened this issue Feb 6, 2019 · 5 comments
Closed

Wrong deprecation message related to PHP templates #30088

javiereguiluz opened this issue Feb 6, 2019 · 5 comments

Comments

@javiereguiluz
Copy link
Member

Symfony version(s) affected: 4.2

Description
When using PHP templates instead of Twig templates, you must store them in src/Resources/views/. However, if you do that, you see a deprecation message telling you to store them in templates/.

Is this OK or should the deprecation message only be displayed for Twig templates?

Originally reported by @nyroDev in https://twitter.com/Nyr0/status/1092901535179255808

@linaori
Copy link
Contributor
linaori commented Feb 6, 2019

The deprecation message seems correct to me. Why are PHP templates to be stored in that directory, can't this be configured? Looks like something to be fixed in the PHP template configuration rather than the deprecation.

@nyroDev
Copy link
Contributor
nyroDev commented Feb 6, 2019

According to the doc this is where PHP templates have to be stored.

thanks @javiereguiluz for creating the issue

@linaori
Copy link
Contributor
linaori commented Feb 6, 2019

There has been word on deprecating the template component if I remember correctly. Regardless, it sounds like the templating component should support this structure as well and have the docs updated accordingly.

jewome62 added a commit to jewome62/symfony-docs that referenced this issue Apr 6, 2019
See into symfony/symfony#30088
The change will be for twig template but not for php.
Currently a deprecated is raised.
jewome62 added a commit to jewome62/symfony-docs that referenced this issue Apr 6, 2019
See into symfony/symfony#30088
The change will be for twig template but not for php.
Currently a deprecated is raised.
@yceruto
Copy link
Member
yceruto commented Apr 6, 2019

I'm taking a look at this...

@yceruto
Copy link
Member
yceruto commented Apr 7, 2019

Okey, the deprecation warning is about Twig templates only, so if you have PHP templates in src/Resources/views no problem, it's still supported for PHP templates and you can ignore that deprecation message until 5.0 where it is gone as well as the support to load Twig templates from the src/Resources/views directory.

I'm updating the deprecation message to be more clear about this. #30952

@fabpot fabpot closed this as completed Apr 7, 2019
fabpot added a commit that referenced this issue Apr 7, 2019
…f the legacy Twig template directory (yceruto)

This PR was merged into the 4.2 branch.

Discussion
----------

[TwigBundle][TwigBridge] Improving deprecation message of the legacy Twig template directory

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #30088
| License       | MIT

#eu-fossa

Commits
-------

89a00b3 Improving deprecation message of the Twig templates directory src/Resources/views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
0