@@ -48,7 +48,7 @@ class Ubiquity {
4848
4949 use CmdTrait;
5050
51- private static $ version = '1.4.3 ' ;
51+ private static $ version = '1.4.4 ' ;
5252
5353 private static $ appName = 'Ubiquity devtools ' ;
5454
@@ -343,8 +343,7 @@ class Ubiquity {
343343 }
344344 FileUtils::xcopy (self ::$ activeDir . "/devtools/project-files/app/controllers/IndexController.php " , "app/controllers/IndexController.php " );
345345
346- // -------------Add themes----------------
347-
346+ self ::openReplaceWrite (self ::$ activeDir . "/devtools/project-files/templates/.env.tpl " , getcwd ()."/.env " , self ::$ configOptions );
348347 self ::openReplaceWrite (self ::$ activeDir . "/devtools/project-files/templates/config.tpl " , "app/config/config.php " , self ::$ configOptions );
349348 self ::openReplaceWrite (self ::$ activeDir . "/devtools/project-files/README.md " , getcwd () . "/README.md " , self ::$ configOptions );
350349
@@ -358,10 +357,17 @@ class Ubiquity {
358357 system ("composer install " );
359358 require_once ROOT . './../vendor/autoload.php ' ;
360359 $ dir = getcwd ();
360+ // -------------Add themes----------------
361361 foreach ($ vendorCopies as $ theme => $ vCopies ) {
362362 InstallThemeCmd::copyVendorFiles ($ theme , $ vCopies , $ dir );
363363 }
364- $ config = require_once 'app/config/config.php ' ;
364+
365+ ob_start ();
366+ \Ubiquity \cache \CacheManager::initCache ($ config );
367+ $ res = ob_get_clean ();
368+ echo ConsoleFormatter::showMessage ($ res , 'info ' , 'cache initialization ' );
369+
370+ $ config = require_once 'app/cache/config/config.cache.php ' ;
365371 \Ubiquity \controllers \Startup::setConfig ($ config );
366372
367373 if (self ::isBooleanTrue (self ::$ configOptions ["%all-models% " ])) {
@@ -371,10 +377,7 @@ class Ubiquity {
371377 $ res = ob_get_clean ();
372378 echo ConsoleFormatter::showMessage ($ res , 'success ' , 'models generation ' );
373379 }
374- ob_start ();
375- \Ubiquity \cache \CacheManager::initCache ($ config );
376- $ res = ob_get_clean ();
377- echo ConsoleFormatter::showMessage ($ res , 'info ' , 'cache initialization ' );
380+
378381 echo ConsoleFormatter::showMessage ("project <b> {$ projectName }</b> successfully created. " , 'success ' , 'new-project ' );
379382 } else {
380383 echo ConsoleFormatter::showMessage ("Project <b> {$ projectName }</b> is partialy created. \nYou will need to run `composer install` in the root folder of the project. \nThen `Ubiquity init-cache` to initialize the cache folders. \n" , 'info ' );
0 commit comments