2amigos / yiinitializr

Library that will help boost your application installation with ease and also to run Yii applications from its bootstrap files on a much cleaner way that the framework currently proposes.
Other
44 stars 17 forks source link

rename root breaks ALL paths #12

Closed circulon closed 11 years ago

circulon commented 11 years ago

Problem : change the name of the root folder that contains all app folders (ie api, backend, common, etc) breaks paths to at least frontend and backend www.

This can be shown by dl an intermediate or advanced Yiinitializer template

Fatal error: Uncaught exception 'Exception' with message 'Unable to find 'yiinitializr.app.directories.config.'backend on the settings.' in /www/adv-test/common/lib/Yiinitializr/Helpers/Initializer.php:67 Stack trace: #0 /www/adv-test/common/lib/Yiinitializr/Helpers/Initializer.php(39): Yiinitializr\Helpers\Initializer::config('backend', Array) #1 /Users/kez/www/adv-test/backend/www/index.php(19): Yiinitializr\Helpers\Initializer::create('./../', 'backend', Array) #2 {main} thrown in /www/adv2-test2/common/lib/Yiinitializr/Helpers/Initializer.php on line 67

I have found no way around this short of using the downloaded template and copying all the configs modules and extensions in by hand.

This is a serious show stopper for testing purposes. If there are specific logs required I can add them but this has me stumped. its like the previous root folder name has been cached somehow and is not being regenerated on a per request basis. Even If I remove all env.php, env.lock files and the common/lib/vendor folder and redo the composer install it makes no difference.

One thing to note is that if you remove the common/lib/vendor folder and rename the root back to what it was originally (in this case test-adv) and re-run the composer install the apps are fully up and running again.

I hope this is enough info to track this down because I really like the simpler Yiinitializr way vs the yii-boiler plate but this issue is really annoying.

tonydspaniard commented 11 years ago

Yiinitialzr has nothing to do with YiiBoilerplate. Yiinitializr is a set of tools that allows you to create any template, thats why we exposed three templates and @Borales did a one folder template to prove it.

If you change the folder structure you need to change the configuration settings, more precisely the console.php and settings.php. Please, check those files and also the configuration files of the app, they all make reference to current folder for full paths. Maybe you find the answer there.

We use Yiinitializr in all our projects and we found no issues at all related to main root folder.