codeguy/Slim-Extras — pull request #34 by ziadoz (2012-09-11 17:23:37+00:00)
Title: Fixed incorrect Composer autoload path for Twig extension.

The Twig extension isn't getting autoloaded because of an incorrect path in ``composer.json``. If you look at the ``autoload_namespaces.php`` generated by Composer it currently looks like this:

$vendorDir . '/slim/extras/Views/Extension/',
);

When the Slim Extras repository is pulled down it ends up in ``./vendor/slim/extras/Slim/Extras``. This means Composer is looking for the ``Twig_Extensions_Slim`` class in ``./vendor/slim/extras/View/Extension``, which doesn't exist. I changed the autoload directory to ``Slim/Extras/View/Extention`` instead and the ``autoload_namespaces.php`` now looks in the correct directory:

$vendorDir . '/slim/extras/Slim/Extras/Views/Extension/',
);

I'm not sure if this is the best way to solve the problem, but it does appear to work. The only other option I can see is to use classmap autoloading instead.