codeguy/Slim-Extras — pull request #58 by fayland (2013-01-20 03:25:26+00:00)
Title: fix Class 'Twig_Extensions_Slim' not found

I'm keep getting

PHP Fatal error: Class 'Twig_Extensions_Slim' not found in /Users/fayland/svn/sites/registercompass_related/web/vendor/slim/extras/Slim/Extras/Views/Twig.php on line 133

which dues to

// Check for Composer Package Autoloader class loading
if (!class_exists('\Twig_Extensions_Autoloader')) {
$extension_autoloader = dirname(__FILE__) . '/Extension/TwigAutoloader.php';
if (file_exists($extension_autoloader)) require_once $extension_autoloader;
}

already loaded vendor/twig/extensions/lib/Twig/Extensions/Autoloader.php
so the vendor/slim/extras/Slim/Extras/Views/Extension/TwigAutoloader.php is not loaded at all.

the fixes force to load vendor/slim/extras/Slim/Extras/Views/Extension/TwigAutoloader.php always (do not check class_exists).

newbie to php and hope it's fine.

Thanks