I was wondering how you guys deal with a new service provider added to app.php before deploying a new version to to the production server.
Pulling changes
Sharing file /var/www/twitter/releases/20140205150233/app/storage/logs
Sharing file /var/www/twitter/releases/20140205150233/app/storage/sessions
Installing Composer dependencies
Composer could not install dependencies
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Nothing to install or update
Generating autoload files
PHP Fatal error: Class 'Jenssegers\Mongodb\MongodbServiceProvider' not found in /var/www/twitter/releases/20140205150233/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 158
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Jenssegers\\Mongodb\\MongodbServiceProvider' not found","file":"\/var\/www\/twitter\/releases\/20140205150233\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/ProviderRepository.php","line":158}}{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Jenssegers\\Mongodb\\MongodbServiceProvider' not found","file":"\/var\/www\/twitter\/releases\/20140205150233\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/ProviderRepository.php","line":158}}Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Jenssegers\Mongodb\MongodbServiceProvider' not found in /var/www/twitter/releases/20140205150233/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 158
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
Setting permissions for /var/www/twitter/releases/20140205150233/app/database/production.sqlite
Setting permissions for /var/www/twitter/releases/20140205150233/app/storage
Setting permissions for /var/www/twitter/releases/20140205150233/public
Successfully updated application
A current workarround is ssh'ing to the production server, uncommenting the added service provider and running composer update
. Next uncommenting the line. But I guess this could be easier done.
Add composer.lock to git your git repo. That holds the versions you have currently installed.
The error suggests that composer.json does not match composer.lock, so you probably have an old version in your repository.
Note that Rocketeer runs composer install
which uses composer.lock (faster and exactly the same version as your dev) and not composer update
.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community