Browse Source

[5.1] Move copying .env.example to post-root-package-install

post-create-project-cmd is executed only after post-install-cmd and this
could cause issue on the first installation (via composer
create-project) where environment is not prepared hence `php artisan
optimize` would generate `compiled.php`.

Signed-off-by: crynobone <crynobone@gmail.com>
crynobone 9 years ago
parent
commit
2ac993f8d3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      composer.json

+ 3 - 1
composer.json

@@ -35,8 +35,10 @@
             "php artisan clear-compiled",
             "php artisan optimize"
         ],
+        "post-root-package-install": [
+            "php -r \"copy('.env.example', '.env');\""
+        ],
         "post-create-project-cmd": [
-            "php -r \"copy('.env.example', '.env');\"",
             "php artisan key:generate"
         ]
     },