synga/laravel-service-provider-helper

The package can add service providers to your app.php when composer update finishes
24 2
Install
composer require synga/laravel-service-provider-helper
Latest Version:1.0.3
PHP:>=5.4
License:MIT
Last Updated:May 11, 2016
Links: GitHub  ·  Packagist
Maintainer: Synga

Laravel service provider helper

Finds all service providers in your project and lets you add them easily to your app.php config file

Installation

Add (for the last time!) the service provider

Synga\ServiceProviderHelper\ServiceProviderHelperServiceProvider::class

to your app.php config file.

Add the following line to you composer.json file. Make sure it is the last entry in the post-update-cmd

"post-update-cmd": [
    ...
    "Synga\\ServiceProviderHelper\\Command\\AddServiceProviderComposerCommand::addServiceProvider"
]

After you add the service provider to your app.php config file you need to run:

php artisan vendor:publish

From this moment, everytime you do a composer update this package checks if there are new service providers. When there are new service providers it will ask if you want to add them. You can add multiple service providers at once. The service providers are added after you choose exit.

Usage

This package can also be used as a standalone CLI command.

php artisan service-provider:add

You can add the --composer or -c option to run the command in composer mode (which will only add new service providers)

##Acknowledgements:

  • When you add a service provider, your app.php config file will have a slightly different formatting. I'm busy with finding a solution

Problems

If you get an error after composer update, make sure you have the latest version of composer. You can run

composer self-update

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

589,172,971 34,950
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
1.0.3 >=5.4 5.* MIT
1.0.2 >=5.4 5.* MIT
1.0.1 >=5.4 5.* MIT
1.0.0 >=5.4 5.* MIT