Skip to content

[TwigBundle] Deprecating support for legacy templates directories #28891

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

Merged
merged 1 commit into from
Oct 21, 2018

Conversation

yceruto
Copy link
Member

@yceruto yceruto commented Oct 16, 2018

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets -
License MIT
Doc PR symfony/symfony-docs#10500

go ahead with #28810 (comment)

  • Fix tests

@yceruto yceruto changed the title [TwigBundle] Deprecating support for old templates directories [TwigBundle] Deprecating support for legacy templates directories Oct 16, 2018
@yceruto yceruto force-pushed the deprecating_old_templates_dir branch from bb92d3d to 4ad6e4a Compare October 16, 2018 15:16
@@ -115,14 +116,18 @@ public function load(array $configs, ContainerBuilder $container)
}

if (file_exists($dir = $container->getParameter('kernel.root_dir').'/Resources/views')) {
if ($dir !== $defaultTwigPath) {
@trigger_error(sprintf('"%s" This templates directory is deprecated since 4.2, use "%s" instead.', $dir, $defaultTwigPath), E_USER_DEPRECATED);
Copy link
Contributor

Choose a reason for hiding this comment

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

- "%s" This templates directory is deprecated since 4.2, use "%s" instead.
+ Templates directory "%s" is deprecated since 4.2, use "%s" instead.

? (same below)

Copy link
Member Author

Choose a reason for hiding this comment

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

Hey! fixed, thanks.

@yceruto yceruto force-pushed the deprecating_old_templates_dir branch from 4ad6e4a to 4f5ed6d Compare October 16, 2018 16:48
@yceruto
Copy link
Member Author

yceruto commented Oct 16, 2018

Ready! (AppVeyor failure is unrelated)

Copy link
Contributor

@ro0NL ro0NL left a comment

Choose a reason for hiding this comment

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

after this we can safely remove the Resources/views paths in TemplateIterator and TemplateFinder, correct? Perhaps add a @deprecated mention here so we don't forget it.

What about TemplateReference?

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.2 Oct 17, 2018
@yceruto
Copy link
Member Author

yceruto commented Oct 17, 2018

after this we can safely remove the Resources/views paths in TemplateIterator and TemplateFinder, correct?

Yeah, in 5.0 :)

What about TemplateReference?

It's part of the Templating layer of the FB, no related IMO.

@yceruto yceruto force-pushed the deprecating_old_templates_dir branch from e0da5ac to acae8bb Compare October 17, 2018 13:47
@yceruto
Copy link
Member Author

yceruto commented Oct 17, 2018

@chalasr comments addressed, thanks. (Ready)

@yceruto yceruto force-pushed the deprecating_old_templates_dir branch from acae8bb to 8b390f3 Compare October 17, 2018 14:09
Copy link
Contributor

@ro0NL ro0NL left a comment

Choose a reason for hiding this comment

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

LGTM

@fabpot
Copy link
Member

fabpot commented Oct 21, 2018

Thank you @yceruto.

@fabpot fabpot merged commit 8b390f3 into symfony:master Oct 21, 2018
fabpot added a commit that referenced this pull request Oct 21, 2018
…directories (yceruto)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[TwigBundle] Deprecating support for legacy templates directories

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#10500

go ahead with #28810 (comment)

- [x] Fix tests

Commits
-------

8b390f3 Deprecating support for legacy templates directories
@yceruto yceruto deleted the deprecating_old_templates_dir branch October 21, 2018 21:08
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Oct 23, 2018
…uto)

This PR was merged into the master branch.

Discussion
----------

Deprecating support for legacy templates directory

Update according to symfony/symfony#28891

Commits
-------

a90ae14 Deprecating support for legacy templates directory
This was referenced Nov 3, 2018
nicolas-grekas added a commit that referenced this pull request May 30, 2019
…om legacy directories (yceruto)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[TwigBundle] Removed capability to load Twig template from legacy directories

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Ref #28891

Commits
-------

4b6752b Removed capability to load Twig template from legacy directories
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.

9 participants