I have a custom Laravel module I wrote that i'm including it in my app.php like so:
'providers' => array(
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
'My\Custom\Provider'
);
Everytime I run a composer update its stalls saying that my class in unavailable:
Error Output: PHP Fatal error: Class My\Custom\Provider not found in ProviderRepository.php on line 157
There must be a way to have my provider in the app config, and still be able to run composer update, otherwise its really difficult to auto-deploy my code?
edit What I find myself doing now is commenting the provider from app.php, running composer update, then re-enabling the provider and everything runs fine.
edit Here is my bootstrap/start.php environments
$env = $app->detectEnvironment(array(
// Dev environments
'dev' => array('dev.xxx.com'),
// Live server catch
'live' => array('live.xxx.com'),
// EU Server catch
'eu.west.1.live' => array('eu-west-1.xxx.com'),
// US server catch
'us.west.1.live' => array('us-west-1.xxx.com'),
// Local test environments
'chris' => array('outrunthewolf-MacBook-Air', 'e7180623aa2e', 'precise64'),
// Local catch
'dev' => array('*')
));
And my autoload from composer
"autoload": {
"classmap": [
"app/commands",
"app/database/migrations",
"app/database/seeds",
"app/tests"
],
"psr-4": {
"": "app/controllers/",
"": "app/libraries/",
"Model\\": "app/models/"
}
},
composer install --no-dev --no-scripts
andphp artisan optimize --env="production"
andphp artisan migrate --force --env="production"
on your production end. – Quasdunk