chris13 / autoregister-classmap-plugin
Plugin composer to register external source code as PSR4.
Installs: 217
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:composer-plugin
Requires
- php: >=5.3
- composer-plugin-api: ^1.0
- neirda24/tools-bundle: ^2.0
- symfony/yaml: ~2.3 || ^3.0
Requires (Dev)
- composer/composer: ~1.0@dev
- phake/phake: ~2.2
- phpunit/phpunit: ~5.1
- symfony/phpunit-bridge: ^2.7
README
This composer plugin allow to register external source code in the autoload of composer from your project
Installation
Step 1: Enable the Plugin
Before downloading it you need to update your composer.json
file with the following:
"extra": "chris-autoregister-classmap": { "path" : "path/to/modules", "filename" : ".module.yml" } }
Path
: Directory where you store all your external source code (module)
Filename
: The file where you have the namespace and the source directory of your module (it can be a hidden file or not)
Step 2: Download the Plugin
Open a command console, enter your project directory and execute the following command to download the latest stable version of this plugin:
$ composer require chris13/autoregister-classmap-plugin "~1"
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Usage
In each external source code (module) directory that you want registered, you need to a YML file containing the namespace and the source directory of your bundle.
namespace: "App\\Module\\Bundle\\ExampleBundle\\" source_dir: "src/"
Tests
Run Test in the plugin :
$ phpunit --debug --testsuite All