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

Skip to content

[TwigBundle] Reconfigure twig paths when they are updated #14781

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 5 commits into from
Closed

[TwigBundle] Reconfigure twig paths when they are updated #14781

wants to merge 5 commits into from

Conversation

chbruyand
Copy link
Contributor

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #14771, #14768, #14262, #14778
License MIT

Refresh twig paths upon creation and deletion. As we don't care neither about path's modification time nor path's content, a new Resource has been added in the Config Component.
Full discussion in #14778.

@mpdude
Copy link
Contributor

mpdude commented May 29, 2015

Not sure, but does src/Symfony/Bundle/TwigBundle/composer.json need an update for symfony/config?

@chbruyand
Copy link
Contributor Author

I think so, but don't know which version to put there

@mpdude
Copy link
Contributor

mpdude commented May 29, 2015

I'd go for ~2.8, which is the first version that will contain the new resource.

*/
public function __toString()
{
return (string) $this->resource;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can do the string casting in the constructor already.

@aitboudad
Copy link
Contributor

👍

@chbruyand
Copy link
Contributor Author

Any other suggestion / improvement ?

@@ -74,23 +75,30 @@ public function load(array $configs, ContainerBuilder $container)
} else {
$twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path, $namespace));
}
$container->addResource(new FileExistenceResource($path));
Copy link
Member

Choose a reason for hiding this comment

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

not needed here as we don't change the container configuration based on the existence of this folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the hint

https://github.com/symfony/symfony/pull/14781/files#r31505368

not needed here as we don't change the container configuration based on
the existence of this folder
@stof
Copy link
Member

stof commented Jun 2, 2015

👍

@aitboudad aitboudad added the Ready label Jun 2, 2015
@fabpot
Copy link
Member

fabpot commented Jun 5, 2015

Thank you @chbruyand.

@fabpot fabpot closed this in 4133aad Jun 5, 2015
@chbruyand chbruyand deleted the ticket_14778 branch June 8, 2015 08:13
@fabpot fabpot mentioned this pull request Nov 16, 2015
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