symfony - Autoload Bundle with custom path in Symfony2 -
i developing symfony2 web app hosted on ubuntu server , want directory structure be:
/symfony (with app,bin , vendor folder in it)
/site1
/site2
this way site1 , site2 use same symfony framework. in /site1 want: /web
, in there want app.php , app_dev.php /web/appbundle of bundle files. figured out need change in app.php require_once dir.'/../symfony/app/appkernel.php'; in 2 places per http://symfony.com/doc/current/cookbook/configuration/override_dir_structure.html
when generated bundle did message "checking bundle autoloaded: failed" , should "edit composer.json file , register bundle namespace in "autoload" section"
i added "appbundle": "/web/appbundle" composer.json autoload section , in cygwin run "composer -n install" starts saying loading composer repositories , says "installing dependencies (including require-dev)" , never goes past that.
what can register bundle not in standard folder autoload picks up? getting fact class not found in appkernel.php
thanks.
it's simple. don't it! use symfony intended default directory structure.
great 2 projects. if have common code, extract bundle , install in both projects via composer.
Comments
Post a Comment