Giter VIP home page Giter VIP logo

composer_installers's Introduction

A Multi-Framework Composer Library Installer

Build Status

This is for PHP package authors to require in their composer.json. It will magically install their package to the correct location based on the specified package type.

Current Supported Package Types:

  • Aura aura-
  • CakePHP 2+ cakephp-
  • CodeIgniter codeigniter-
  • Drupal drupal-
  • FuelPHP fuelphp-
  • Joomla joomla-
  • Laravel laravel-
  • Lithium lithium-
  • Magento magento-
  • phpBB phpbb-
  • PPI ppi-
  • Symfony1 symfony1-
  • WordPress wordpress-
  • Zend zend-

Example composer.json File

This is an example for a CakePHP plugin. The only important parts to set in your composer.json file are "type": "cakephp-plugin" which describes what your package is and "require": { "composer/installers": "*" } which tells composer to load the custom installers.

{
    "name": "you/ftp",
    "type": "cakephp-plugin",
    "require": {
        "composer/installers": "*"
    }
}

This would install your package to the app/Plugin/Ftp/ folder of a CakePHP app when a user runs php composer.phar install.

So submit your packages to packagist.org!

Current Supported Types

  • Aura
    • aura-package
    • aura-include
  • CakePHP
    • cakephp-plugin
  • CodeIgniter
    • codeigniter-library
    • codeigniter-third-party
  • Drupal
    • drupal-module
    • drupal-theme
    • drupal-profile
    • drupal-drush
  • FuelPHP
    • fuelphp-module
  • Joomla
    • joomla-component
    • joomla-module
    • joomla-template
    • joomla-plugin
    • joomla-library
  • Laravel
    • laravel-library
  • Lithium
    • lithium-library
    • lithium-source
  • Magento
    • magento-library
    • magento-skin
    • magento-theme
  • phpBB
    • phpbb-extension
  • PPI
    • ppi-module
  • symfony1
    • symfony1-plugin
  • WordPress
    • wordpress-plugin
    • wordpress-theme
  • Zend
    • zend-library
    • zend-extra

Types in bold have been marked stable and you can rely on those install paths to not change. A new type must be created if any adjustments are requested for an install path.

Custom Install Paths

If you are consuming a package that uses the composer/installers you can override the install path with the following extra in your composer.json:

{
    "extra": {
        "installer-paths": {
            "your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
        }
    }
}

This would use your custom path for each of the listed packages. The available variables to use in your paths are: ${name}, {$vendor}, {$type}.

Contribute!

  • Fork and clone.
  • Run the command php composer.phar install --dev to install the dev dependencies. See Composer.
  • Use the command phpunit to run the tests. See PHPUnit.
  • Create a branch, commit, push and send us a pull request.

To ensure a consistent code base, you should make sure the code follows the Coding Standards which we borrowed from Symfony.

If you would like to help, please take a look at the list of issues.

composer_installers's People

Contributors

shama avatar seldaek avatar gromnan avatar robloach avatar harikt avatar joseym avatar pborreli avatar

Watchers

Matt Ratzke avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.