composer php - Is it safe to commit compiled.php file for Laravel? -


i understand laravel developers have ignored in .gitignore file, ignored composer.lock file think bad form. question safe commit , push compiled.php production?

it depends on deployment process , of include in compiled.php file. if add composer.lock in version manager, run composer install when deploy , add nothing in config/compile.php, yes quite safe.

but gain ? have put in composer.json:

"scripts": {     "post-install-cmd": [         "php artisan clear-compiled",         "php artisan optimize"     ],     "post-update-cmd": [         "php artisan clear-compiled",         "php artisan optimize"     ] }, 

and compiled.php file generated in each deployment. avoid kind of problem if in project decide run composer update somewhere.

as package manager, composer managing dependencies. if commit compiled.php file, bypass composer , use compiled.php rustic package manager...


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -