fuzzyma/composer-register-bundle-plugin

A composer plugin to register your symfony packages to the AppKernel

0.2.1 2016-08-09 11:34 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:31:55 UTC


README

#ComposerRegisterBundlePlugin

A composer plugin to register your symfony packages to the AppKernel. Note, that you need composer in version 1.2 installed to make package install available.

Installation

composer require fuzzyma/composer-register-bundle-plugin

Usage

To register a bundle simply execute composer register packageName e.g.

composer register fuzzyma/contao-database-commands-bundle

If the package is not installed, the command will ask if you want to do that. Pass --install or --install=0 to skip the question and install/don't install the packages automatically.

You can also pass the fully qualified namespace instead but make sure to pass the namespace option in this case:

composer register Fuzzyma/Contao/DatabaseCommandsBundle/ContaoDatabaseCommandsBundle --namespace
// or
composer register Fuzzyma\\Contao\\DatabaseCommandsBundle\\ContaoDatabaseCommandsBundle --namespace

The plugin comes with a method to register bundles on events e.g. the post-package-install event.

Just add the following to your composer.json to immediately register a bundle after installation:

"post-package-install": [
    "Fuzzyma\\Composer\\RegisterBundlePlugin\\Commands\\RegisterCommand::registerBundle"
]

Don't forget to configure your Bundle before using it!

Options

  • --install installs packages without asking if not installed and
  • --install=0 skips the installation of not-installed packages
  • --namespace use namespace of package instead of package name
  • All options from composer install (v1.2) are available and have the same effect