Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Laminas module installer #518

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
189 changes: 95 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,100 +36,101 @@ all vendor code in the vendor directory, and not requiring custom installer code
> 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-module`<br>`asgard-theme`
| Attogram | `attogram-module`
| AGL | `agl-module`
| Bonefish | `bonefish-package`
| AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
| Bitrix | `bitrix-module` (deprecated) <br>`bitrix-component` (deprecated) <br>`bitrix-theme` (deprecated) <br><br> `bitrix-d7-module` <br> `bitrix-d7-component` <br> `bitrix-d7-template`
| CakePHP 2+ | **`cakephp-plugin`**
| Chef | `chef-cookbook`<br>`chef-role`
| CiviCrm | `civicrm-ext`
| CCFramework | `ccframework-ship`<br>`ccframework-theme`
| Cockpit | `cockpit-module`
| CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
| concrete5 | `concrete5-core`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-block`<br>`concrete5-update`
| Croogo | `croogo-plugin`<br>`croogo-theme`
| Decibel | `decibel-app`
| Dframe | `dframe-module`
| DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
| Dolibarr | `dolibarr-module`
| Drupal | <b>`drupal-core`<br>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-database-driver`<br>`drupal-drush`<br>`drupal-custom-theme`<br>`drupal-custom-module`<br>`drupal-custom-profile`<br>`drupal-drupal-multisite`<br>`drupal-console`<br>`drupal-console-language`<br>`drupal-config`
| Elgg | `elgg-plugin`
| Eliasis | `eliasis-component`<br>`eliasis-module`<br>`eliasis-plugin`<br>`eliasis-template`
| ExpressionEngine 3 | `ee3-addon`<br>`ee3-theme`
| eZ Platform | `ezplatform-assets`<br>`ezplatform-meta-assets`
| FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
| FuelPHP v2.x | `fuelphp-component`
| Grav | `grav-plugin`<br>`grav-theme`
| Hurad | `hurad-plugin`<br>`hurad-theme`
| ImageCMS | `imagecms-template`<br>`imagecms-module`<br>`imagecms-library`
| iTop | `itop-extension`
| Kanboard | `kanboard-plugin`
| Known | `known-plugin`<br>`known-theme`<br>`known-console`
| KodiCMS | `kodicms-plugin`<br>`kodicms-media`
| Kohana | **`kohana-module`**
| Lan Management System | `lms-plugin`<br>`lms-template`<br>`lms-document-template`<br>`lms-userpanel-module`
| Laravel | `laravel-library`
| Lavalite | `lavalite-theme`<br>`lavalite-package`
| Lithium | **`lithium-library`<br>`lithium-source`**
| Magento | `magento-library`<br>`magento-skin`<br>`magento-theme`
| majima | `majima-plugin`
| Mako | `mako-package`
| MantisBT | `mantisbt-plugin`
| Matomo | `matomo-plugin`
| Mautic | `mautic-core`<br>`mautic-plugin`<br>`mautic-theme`
| Maya | `maya-module`
| MODX | `modx-extra`
| MODX Evo | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
| MediaWiki | `mediawiki-extension`
| Miaoxing | `miaoxing-plugin`
| October | **`october-module`<br>`october-plugin`<br>`october-theme`**
| OntoWiki | `ontowiki-extension`<br>`ontowiki-theme`<br>`ontowiki-translation`
| OXID | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
| Osclass | `osclass-plugin`<br>`osclass-theme`<br>`osclass-language`
| MODULEWork | `modulework-module`
| Moodle | `moodle-*` (Please [check source](https://github.com/composer/installers/blob/main/src/Composer/Installers/MoodleInstaller.php) for all supported types)
| Pantheon | `quicksilver-script`<br>`quicksilver-module`
| Piwik | `piwik-plugin`
| Phifty | `phifty-bundle`<br>`phifty-framework`<br>`phifty-library`
| phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
| Plentymarkets | `plentymarkets-plugin`
| PPI | **`ppi-module`**
| Prestashop | `prestashop-module`<br>`prestashop-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`** <br> **`reindex-theme`**
| Roundcube | `roundcube-plugin`
| shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
| SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
| SiteDirect | `sitedirect-module`<br>`sitedirect-plugin`
| SMF | `smf-module`<br>`smf-theme`
| Starbug | `starbug-module`<br>`starbug-theme`<br>`starbug-custom-module`<br>`starbug-custom-theme`
| SyDES | `sydes-module`<br>`sydes-theme`
| Sylius | `sylius-theme`
| TAO | `tao-extension`
| TastyIgniter | **`tastyigniter-module`<br>`tastyigniter-extension`<br>`tastyigniter-theme`**
| Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
| UserFrosting | `userfrosting-sprinkle`
| Vanilla | `vanilla-plugin`<br>`vanilla-theme`
| Vgmcp | `vgmcp-bundle`<br>`vgmcp-theme`
| WHMCS | `whmcs-addons`<br>`whmcs-fraud`<br>`whmcs-gateways`<br>`whmcs-notifications`<br>`whmcs-registrars`<br>`whmcs-reports`<br>`whmcs-security`<br>`whmcs-servers`<br>`whmcs-social`<br>`whmcs-support`<br>`whmcs-templates`<br>`whmcs-includes`
| Winter CMS | **`winter-module`<br>`winter-plugin`<br>`winter-theme`**
| Wolf CMS | `wolfcms-plugin`
| WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`<br>`wordpress-dropin`
| YAWIK | `yawik-module`
| Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
| Zikula | `zikula-module`<br>`zikula-theme`
| Framework | Types
|-----------------------------| -----
| Akaunting | `akaunting-module`
| Asgard | `asgard-module`<br>`asgard-theme`
| Attogram | `attogram-module`
| AGL | `agl-module`
| Bonefish | `bonefish-package`
| AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
| Bitrix | `bitrix-module` (deprecated) <br>`bitrix-component` (deprecated) <br>`bitrix-theme` (deprecated) <br><br> `bitrix-d7-module` <br> `bitrix-d7-component` <br> `bitrix-d7-template`
| CakePHP 2+ | **`cakephp-plugin`**
| Chef | `chef-cookbook`<br>`chef-role`
| CiviCrm | `civicrm-ext`
| CCFramework | `ccframework-ship`<br>`ccframework-theme`
| Cockpit | `cockpit-module`
| CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
| concrete5 | `concrete5-core`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-block`<br>`concrete5-update`
| Croogo | `croogo-plugin`<br>`croogo-theme`
| Decibel | `decibel-app`
| Dframe | `dframe-module`
| DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
| Dolibarr | `dolibarr-module`
| Drupal | <b>`drupal-core`<br>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-database-driver`<br>`drupal-drush`<br>`drupal-custom-theme`<br>`drupal-custom-module`<br>`drupal-custom-profile`<br>`drupal-drupal-multisite`<br>`drupal-console`<br>`drupal-console-language`<br>`drupal-config`
| Elgg | `elgg-plugin`
| Eliasis | `eliasis-component`<br>`eliasis-module`<br>`eliasis-plugin`<br>`eliasis-template`
| ExpressionEngine 3 | `ee3-addon`<br>`ee3-theme`
| eZ Platform | `ezplatform-assets`<br>`ezplatform-meta-assets`
| FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
| FuelPHP v2.x | `fuelphp-component`
| Grav | `grav-plugin`<br>`grav-theme`
| Hurad | `hurad-plugin`<br>`hurad-theme`
| ImageCMS | `imagecms-template`<br>`imagecms-module`<br>`imagecms-library`
| iTop | `itop-extension`
| Kanboard | `kanboard-plugin`
| Known | `known-plugin`<br>`known-theme`<br>`known-console`
| KodiCMS | `kodicms-plugin`<br>`kodicms-media`
| Kohana | **`kohana-module`**
| Lan Management System | `lms-plugin`<br>`lms-template`<br>`lms-document-template`<br>`lms-userpanel-module`
| Laminas | `laminas-module`
| Laravel | `laravel-library`
| Lavalite | `lavalite-theme`<br>`lavalite-package`
| Lithium | **`lithium-library`<br>`lithium-source`**
| Magento | `magento-library`<br>`magento-skin`<br>`magento-theme`
| majima | `majima-plugin`
| Mako | `mako-package`
| MantisBT | `mantisbt-plugin`
| Matomo | `matomo-plugin`
| Mautic | `mautic-core`<br>`mautic-plugin`<br>`mautic-theme`
| Maya | `maya-module`
| MODX | `modx-extra`
| MODX Evo | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
| MediaWiki | `mediawiki-extension`
| Miaoxing | `miaoxing-plugin`
| October | **`october-module`<br>`october-plugin`<br>`october-theme`**
| OntoWiki | `ontowiki-extension`<br>`ontowiki-theme`<br>`ontowiki-translation`
| OXID | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
| Osclass | `osclass-plugin`<br>`osclass-theme`<br>`osclass-language`
| MODULEWork | `modulework-module`
| Moodle | `moodle-*` (Please [check source](https://github.com/composer/installers/blob/main/src/Composer/Installers/MoodleInstaller.php) for all supported types)
| Pantheon | `quicksilver-script`<br>`quicksilver-module`
| Piwik | `piwik-plugin`
| Phifty | `phifty-bundle`<br>`phifty-framework`<br>`phifty-library`
| phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
| Plentymarkets | `plentymarkets-plugin`
| PPI | **`ppi-module`**
| Prestashop | `prestashop-module`<br>`prestashop-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`** <br> **`reindex-theme`**
| Roundcube | `roundcube-plugin`
| shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
| SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
| SiteDirect | `sitedirect-module`<br>`sitedirect-plugin`
| SMF | `smf-module`<br>`smf-theme`
| Starbug | `starbug-module`<br>`starbug-theme`<br>`starbug-custom-module`<br>`starbug-custom-theme`
| SyDES | `sydes-module`<br>`sydes-theme`
| Sylius | `sylius-theme`
| TAO | `tao-extension`
| TastyIgniter | **`tastyigniter-module`<br>`tastyigniter-extension`<br>`tastyigniter-theme`**
| Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
| UserFrosting | `userfrosting-sprinkle`
| Vanilla | `vanilla-plugin`<br>`vanilla-theme`
| Vgmcp | `vgmcp-bundle`<br>`vgmcp-theme`
| WHMCS | `whmcs-addons`<br>`whmcs-fraud`<br>`whmcs-gateways`<br>`whmcs-notifications`<br>`whmcs-registrars`<br>`whmcs-reports`<br>`whmcs-security`<br>`whmcs-servers`<br>`whmcs-social`<br>`whmcs-support`<br>`whmcs-templates`<br>`whmcs-includes`
| Winter CMS | **`winter-module`<br>`winter-plugin`<br>`winter-theme`**
| Wolf CMS | `wolfcms-plugin`
| WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`<br>`wordpress-dropin`
| YAWIK | `yawik-module`
| Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
| Zikula | `zikula-module`<br>`zikula-theme`

## Example `composer.json` File

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"Known",
"Kohana",
"Lan Management System",
"Laminas",
"Laravel",
"Lavalite",
"Lithium",
Expand Down
1 change: 1 addition & 0 deletions src/Composer/Installers/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Installer extends LibraryInstaller
'kodicms' => 'KodiCMSInstaller',
'kohana' => 'KohanaInstaller',
'lms' => 'LanManagementSystemInstaller',
'laminas' => 'LaminasInstaller',
'laravel' => 'LaravelInstaller',
'lavalite' => 'LavaLiteInstaller',
'lithium' => 'LithiumInstaller',
Expand Down
11 changes: 11 additions & 0 deletions src/Composer/Installers/LaminasInstaller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Composer\Installers;

class LaminasInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = [
'module' => 'module/{$name}/',
];
}
18 changes: 18 additions & 0 deletions tests/Composer/Installers/Test/InstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public function supportsProvider(): array
array('lms-template', true),
array('lms-document-template', true),
array('lms-userpanel-module', true),
array('laminas-module', true),
array('laravel-library', true),
array('lavalite-theme', true),
array('lavalite-package', true),
Expand Down Expand Up @@ -330,6 +331,7 @@ public function installPathProvider(): array
array('known-theme', 'Themes/SampleTheme/', 'known/SampleTheme'),
array('known-console', 'ConsolePlugins/SampleConsolePlugin/', 'known/SampleConsolePlugin'),
array('kohana-module', 'modules/my_package/', 'shama/my_package'),
array('laminas-module', 'module/MyLaminasModule/', 'shama/MyLaminasModule'),
array('lms-plugin', 'plugins/MyPackage/', 'shama/MyPackage'),
array('lms-plugin', 'plugins/MyPackage/', 'shama/my_package'),
array('lms-template', 'templates/MyPackage/', 'shama/MyPackage'),
Expand Down Expand Up @@ -509,6 +511,22 @@ public function testCustomTypePath(): void
$this->assertEquals(getcwd() . '/my/custom/path/my_plugin/', $result);
}

public function testCustomLaminasPath(): void
{
$installer = new Installer($this->io, $this->composer);
$package = new Package('slbmeh/my_plugin', '1.0.0', '1.0.0');
$package->setType('laminas-module');
$this->composer->getPackage()->setExtra(array(
'installer-paths' => array(
'my/custom/path/{$name}/' => array(
'type:laminas-module'
),
),
));
$result = $installer->getInstallPath($package);
$this->assertEquals(getcwd() . '/my/custom/path/my_plugin/', $result);
}

public function testVendorPath(): void
{
$installer = new Installer($this->io, $this->composer);
Expand Down