Skip to content

module to create binaries and scripts which get executed in context of composer so they are able to access content from the composer.json

Notifications You must be signed in to change notification settings

magento-hackathon/composer-command-integrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Composer Command Integrator

Build Status

Extending the functionality of Composer is not that easy. There are several points, which make it harder to add functionality by external libraries.

This library adds some example code, how to add scripts, which are able to use composers internal structure. This could be wanted for custom installers or module managers, which use composer as base and want to offer additional commands which need things like information about libraries installed with composer.

Also this library offers a simple API to add own Commands similar to the Composer ones. Only difference is, we have an own script as entry point, which needs to be used.

All Commands added to the extra.composer-command-registry in your libraries composer.json get added to this entry point.

    "extra":{
        "composer-command-registry": [
        "MagentoHackathon\\Composer\\Magento\\Command\\DeployCommand"
         ]
    }

As you see, this is an Array, so you can add more than one command per module.

To get a help message and see a list of available commands, simply call the binary:

    php ./vendor/bin/composerCommandIntegrator.php

To execute an command, simply specify it as an argument. For example:

    php ./vendor/bin/composerCommandIntegrator.php magento-module-deploy

Projects which implemented this

Tests

phpunit

About

module to create binaries and scripts which get executed in context of composer so they are able to access content from the composer.json

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages