maxnuf / MaxnufSmarty

Zend Framework 2 Module that provides a Smarty rendering strategy
3 stars 3 forks source link

Fatal error: Class 'Smarty' not found in mysite/vendor/MaxnufSmarty/src/MaxnufSmarty/Smarty/MaxnufSmarty.php on line 9 #1

Closed electricowl closed 12 years ago

electricowl commented 12 years ago

Hi,

I've installed MaxnufSmarty into my ZF2 application under the vendors/MaxnufSmarty folder.

composer.phar update has been run against the composer.json file there and there were no error messages. The Smarty libraries have been installed.

It appears that neither the vendor/MaxnufSmarty/vendor/composer/autoload_classmap,php nor the vendor/MaxnufSmarty/vendor/smarty/smarty/vendor/composer/autoload_classmap.php are being loaded.

Can you suggest a solution here? I suspect there may be a line missing in the configuration somewhere but I'm not sure where.

Thanks, Ian

maxnuf commented 12 years ago

you're not supposed to run composer.phar on the composer.json in a module directly. just add "maxnuf/maxnuf-smarty": "dev-master" to the composer.json in the root directory of your application. run composer.phar update on that file. it will automagically load smarty/smarty and maxnuf/maxnuf-smarty. composer will create a file vendor/composer/autoload_classmap.php

Are you using the zendskeleton application? http://github.com/zendframework/ZendSkeletonApplication also vendors should be installed in the 'vendor' directory.

hope this helps.

electricowl commented 12 years ago

Thanks for that.

I'm new to using composer.phar and composer.json .

I added the line you suggested to the "require" array in the top level composer.json file. Running composer.phar update installed smarty ans maxnuf-smarty successfully.

Thanks for the assistance.