ProductPromotion
Logo

PHP

made by https://0x3d.site

GitHub - composer/installers: A Multi-Framework Composer Library Installer
A Multi-Framework Composer Library Installer. Contribute to composer/installers development by creating an account on GitHub.
Visit Site

GitHub - composer/installers: A Multi-Framework Composer Library Installer

GitHub - composer/installers: A Multi-Framework Composer Library Installer

A Multi-Framework Composer Library Installer

Continuous Integration

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

The goal of Installers is to be a simple package type to install path map. Users can also customize the install path per package and package authors can modify the package name upon installing.

Installers isn't intended on replacing all custom installers. If your package requires special installation handling then by all means, create a custom installer to handle it.

Natively Supported Frameworks:

Most frameworks these days natively work with Composer and will be installed to the default vendor directory. composer/installers is not needed to install packages with these frameworks.

Alternative to custom installers with Composer 2.1+

As of Composer 2.1, the Composer\InstalledVersions class has a getInstalledPackagesByType method which can let you figure out at runtime which plugins/modules/extensions are installed.

It is highly recommended to use that instead of building new custom installers if you are building a new application. This has the advantage of leaving all vendor code in the vendor directory, and not requiring custom installer code.

Current Supported Package Types

Stable types are marked as bold, this means that installation paths for those type will not be changed. Any adjustment for those types would require creation of brand new type that will cover required changes.

Framework Types
Akaunting akaunting-module
Asgard asgard-moduleasgard-theme
Attogram attogram-module
AGL agl-module
Bonefish bonefish-package
Botble botble-pluginbotble-theme
AnnotateCms annotatecms-moduleannotatecms-componentannotatecms-service
Bitrix bitrix-module (deprecated) bitrix-component (deprecated) bitrix-theme (deprecated) bitrix-d7-module bitrix-d7-component bitrix-d7-template
CakePHP 2+ cakephp-plugin
Chef chef-cookbookchef-role
CiviCrm civicrm-ext
CCFramework ccframework-shipccframework-theme
Cockpit cockpit-module
CodeIgniter codeigniter-librarycodeigniter-third-partycodeigniter-module
concrete5 concrete5-coreconcrete5-packageconcrete5-themeconcrete5-blockconcrete5-update
ConcreteCMS concretecms-coreconcretecms-packageconcretecms-themeconcretecms-blockconcretecms-update
Croogo croogo-plugincroogo-theme
Decibel decibel-app
Dframe dframe-module
DokuWiki dokuwiki-plugindokuwiki-template
Dolibarr dolibarr-module
Drupal drupal-coredrupal-moduledrupal-themedrupal-librarydrupal-profiledrupal-database-driverdrupal-drushdrupal-custom-themedrupal-custom-moduledrupal-custom-profiledrupal-drupal-multisitedrupal-consoledrupal-console-languagedrupal-configdrupal-recipe
Elgg elgg-plugin
Eliasis eliasis-componenteliasis-moduleeliasis-plugineliasis-template
ExpressionEngine 3 ee3-addonee3-theme
eZ Platform ezplatform-assetsezplatform-meta-assets
ForkCMS ^v6.x fork-cms-modulefork-cms-theme
FuelPHP v1.x fuel-modulefuel-packagefuel-theme
FuelPHP v2.x fuelphp-component
Grav grav-plugingrav-theme
Hurad hurad-pluginhurad-theme
ImageCMS imagecms-templateimagecms-moduleimagecms-library
iTop itop-extension
Kanboard kanboard-plugin
Known known-pluginknown-themeknown-console
KodiCMS kodicms-pluginkodicms-media
Kohana kohana-module
Lan Management System lms-pluginlms-templatelms-document-templatelms-userpanel-module
Laravel laravel-library
Lavalite lavalite-themelavalite-package
Lithium lithium-librarylithium-source
Magento magento-librarymagento-skinmagento-theme
majima majima-plugin
Mako mako-package
MantisBT mantisbt-plugin
Matomo matomo-plugin
Mautic mautic-coremautic-pluginmautic-theme
Maya maya-module
MODX modx-extra
MODX Evo modxevo-snippetmodxevo-pluginmodxevo-modulemodxevo-templatemodxevo-lib
MediaWiki mediawiki-extension
Miaoxing miaoxing-plugin
October october-moduleoctober-pluginoctober-theme
OntoWiki ontowiki-extensionontowiki-themeontowiki-translation
OXID oxid-moduleoxid-themeoxid-out
Osclass osclass-pluginosclass-themeosclass-language
MODULEWork modulework-module
Moodle moodle-* (Please check source for all supported types)
Pantheon quicksilver-scriptquicksilver-module
Piwik piwik-plugin
Phifty phifty-bundlephifty-frameworkphifty-library
phpBB phpbb-extensionphpbb-stylephpbb-language
Plentymarkets plentymarkets-plugin
PPI ppi-module
Prestashop prestashop-moduleprestashop-theme
Puppet puppet-module
Porto porto-container
ProcessWire processwire-module
RadPHP radphp-bundle
REDAXO redaxo-addon
REDAXO bestyle-plugin redaxo-bestyle-plugin
REDAXO V5.* redaxo5-addon
REDAXO V5.* bestyle-plugin redaxo5-bestyle-plugin
ReIndex reindex-plugin reindex-theme
Roundcube roundcube-plugin
shopware shopware-backend-pluginshopware-core-pluginshopware-frontend-pluginshopware-themeshopware-pluginshopware-frontend-theme
SilverStripe silverstripe-modulesilverstripe-theme
SiteDirect sitedirect-modulesitedirect-plugin
SMF smf-modulesmf-theme
Starbug starbug-modulestarbug-themestarbug-custom-modulestarbug-custom-theme
SyDES sydes-modulesydes-theme
Sylius sylius-theme
TAO tao-extension
TastyIgniter tastyigniter-moduletastyigniter-extensiontastyigniter-theme
Tusk tusk-tasktusk-commandtusk-asset
UserFrosting userfrosting-sprinkle
Vanilla vanilla-pluginvanilla-theme
Vgmcp vgmcp-bundlevgmcp-theme
WHMCS whmcs-addonswhmcs-fraudwhmcs-gatewayswhmcs-notificationswhmcs-registrarswhmcs-reportswhmcs-securitywhmcs-serverswhmcs-socialwhmcs-supportwhmcs-templateswhmcs-includes
Winter CMS winter-modulewinter-pluginwinter-theme
Wolf CMS wolfcms-plugin
WordPress wordpress-pluginwordpress-themewordpress-mupluginwordpress-dropin
YAWIK yawik-module
Zend zend-libraryzend-extrazend-module
Zikula zikula-modulezikula-theme

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": "~1.0" } which tells composer to load the custom installers.

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

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

So submit your packages to packagist.org!

Custom Install Paths

If you are requiring a package which has one of the supported types 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"]
        }
    }
}

You can determine a non-standard installation path for all packages of a particular type with the type: prefix. The type must be one of types listed on the supported list above.

{
    "extra": {
        "installer-paths": {
            "your/custom/path/{$name}/": ["type:wordpress-plugin"]
        }
    }
}

You can also install all packages by a particular vendor to a custom installation path by using the vendor: prefix. The path will still only apply to packages by the vendor with a type in the supported list.

{
    "extra": {
        "installer-paths": {
            "your/custom/path/{$name}/": ["vendor:my_organization"]
        }
    }
}

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

Note: If multiple custom installer-paths match for the same package, the first one which matches will be used.

Custom Install Names

If you're a package author and need your package to be named differently when installed consider using the installer-name extra.

For example you have a package named shama/cakephp-ftp with the type cakephp-plugin. Installing with composer/installers would install to the path Plugin/CakephpFtp. Due to the strict naming conventions, you as a package author actually need the package to be named and installed to Plugin/Ftp. Using the following config within your package composer.json will allow this:

{
    "name": "shama/cakephp-ftp",
    "type": "cakephp-plugin",
    "extra": {
        "installer-name": "Ftp"
    }
}

Please note the name entered into installer-name will be the final and will not be inflected.

Disabling installers

There may be time when you want to disable one or more installers from composer/installers. For example, if you are managing a package or project that uses a framework specific installer that conflicts with composer/installers but also have a dependency on a package that depends on composer/installers.

Installers can be disabled for your project by specifying the extra installer-disable property. If set to true, "all", or "*" all installers will be disabled.

{
    "extra": {
        "installer-disable": true
    }
}

Otherwise a single installer or an array of installers may be specified.

{
    "extra": {
        "installer-disable": [
            "cakephp",
            "drupal"
        ]
    }
}

Note: Using a global disable value (true, "all", or "*") will take precedence over individual installer names if used in an array. The example below will disable all installers.

{
    "extra": {
        "installer-disable": [
          "drupal",
          "all"
        ]
    }
}

Should we allow dynamic package types or paths? No

What are they? The ability for a package author to determine where a package will be installed either through setting the path directly in their composer.json or through a dynamic package type: "type": "framework-install-here".

It has been proposed many times. Even implemented once early on and then removed. Installers won't do this because it would allow a single package author to wipe out entire folders without the user's consent. That user would then come here to yell at us.

Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory