Skip to content
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

V1Engine passes a wrong second argument to Twig_Loader_Filesystem in recent versions #26

Closed
stof opened this issue Jan 9, 2017 · 3 comments

Comments

@stof
Copy link
Contributor

stof commented Jan 9, 2017

The V1Engine passes the cache directory to the second argument of Twig_Loader_Filesystem for compat with very old versions of Twig 1.x

But recent versions of Twig 1.x use this argument in another way, which might cause issues.

@stof
Copy link
Contributor Author

stof commented Jan 9, 2017

Here is my proposal:

  • drop support for Twig versions passing the cache folder to the loader (do you really need to keep support for Twig 0.9.2 and older ? Is there anyone really using it recently ?)
  • go back to a single engine then (as the only difference would be the usage of the deprecated Twig_Autoloader then, and you can use your own autoloader even in Twig 1.x, removing the need to ignore the deprecation)

what do you think ?

@ninsuo
Copy link
Owner

ninsuo commented Jan 9, 2017

From data, I see that the oldest version used so far is Twig 1.1.0.
And as soon as twigfiddle claims to support 1.x and 2.x, I've nothing against removing support to 0.x.
Or I may even use V1 twig engine just for Twig 0.x.

@ninsuo ninsuo closed this as completed in 9ca5d29 Jan 9, 2017
ninsuo added a commit that referenced this issue Jan 9, 2017
@ninsuo
Copy link
Owner

ninsuo commented Jan 9, 2017

Now, Twig 2.x and 1.x use V2 engine, where Twig 0.x uses engine V1.
In Twig-0.9.10 (last version supported), Loader doesn't take a 2nd argument, so there will be no issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants