Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Autoload twig extensions #1

Closed
ornicar opened this issue Aug 13, 2010 · 1 comment
Closed

Autoload twig extensions #1

ornicar opened this issue Aug 13, 2010 · 1 comment

Comments

@ornicar
Copy link
Contributor

ornicar commented Aug 13, 2010

The twig doc says extensions should be autoloaded: http://www.twig-project.org/book/04-Extending-Twig

I can't achieve to autoload correctly the Debug extension using Symfony2 UniversalClassLoader. If I configure it this way:

$loader->registerPrefixes(array(
    'Twig_'  => __DIR__.'/vendor/twig-extensions',
));

Then Twig_Extension_Debug is autoloaded, but not Twig_Node_Debug, nor Twig_TokenParser_Debug. Because they live in an "Extension/" directory, and the class name doesn't contain "Extension".

How are we supposed to autoload these classes?

@fabpot
Copy link
Contributor

fabpot commented Aug 13, 2010

fixed

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants