I'm trying to transition a Laravel 4.2 site from Forge to Forge/Envoyer. I'm following the laracast but I keep getting the error:
PHP Fatal error: Class 'Way\Generators\GeneratorsServiceProvider' not found in /home/forge/Site/envoyer/releases/20150511192402/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
on the Install Composer Dependencies step of Envoyer deployment.
I've removed the lines for Way/Generators from both composer.json
and config/app.php
and have followed the documentation to re-install it. Envoyer works with Way/Generators removed but keeps failing when I add it back.
Anyone have any ideas on how to fix it?
In composer.json add way/generators inside "require-dev", so it will be downloaded only on your dev machine.
"require-dev": {
"way/generators": "~2.0"
}
Add Way\Generators\GeneratorsServiceProvider
only inside your local (development) config - config/local/app.php
. That way it will be present on your development machine, because it will use config/local/app.php
, but while deploying, envoyer will use config/app.php
, where Way\Generators\GeneratorsServiceProvider
are not set.
This is how your config/local/app.php
can look like:
<?php
return array(
'debug' => true,
'providers' => append_config(array(
'Way\Generators\GeneratorsServiceProvider'
))
);