Skip to content

Commit 1313807

Browse files
authored
Merge pull request #533 from sangnguyenplus/main
Add Botble Installer
2 parents 89a72aa + 346222b commit 1313807

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ all vendor code in the vendor directory, and not requiring custom installer code
4343
| Attogram | `attogram-module`
4444
| AGL | `agl-module`
4545
| Bonefish | `bonefish-package`
46+
| Botble | `botble-plugin`<br>`botble-theme`
4647
| AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
4748
| 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`
4849
| CakePHP 2+ | **`cakephp-plugin`**
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Composer\Installers;
4+
5+
class BotbleInstaller extends BaseInstaller
6+
{
7+
/** @var array<string, string> */
8+
protected $locations = array(
9+
'plugin' => 'platform/plugins/{$name}/',
10+
'theme' => 'platform/themes/{$name}/',
11+
);
12+
}

src/Composer/Installers/Installer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class Installer extends LibraryInstaller
2626
'agl' => 'AglInstaller',
2727
'annotatecms' => 'AnnotateCmsInstaller',
2828
'bitrix' => 'BitrixInstaller',
29+
'botble' => 'BotbleInstaller',
2930
'bonefish' => 'BonefishInstaller',
3031
'cakephp' => 'CakePHPInstaller',
3132
'chef' => 'ChefInstaller',

tests/Composer/Installers/Test/InstallerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ public function supportsProvider(): array
7979
array('bitrix-module', true),
8080
array('bitrix-component', true),
8181
array('bitrix-theme', true),
82+
array('botble-plugin', true),
83+
array('botble-theme', true),
8284
array('bonefish-package', true),
8385
array('cakephp', false),
8486
array('cakephp-', false),
@@ -275,6 +277,8 @@ public function installPathProvider(): array
275277
array('bitrix-d7-module', 'bitrix/modules/author.my_module/', 'author/my_module'),
276278
array('bitrix-d7-component', 'bitrix/components/author/my_component/', 'author/my_component'),
277279
array('bitrix-d7-template', 'bitrix/templates/author_my_template/', 'author/my_template'),
280+
array('botble-plugin', 'platform/plugins/my_plugin/', 'author/my_plugin'),
281+
array('botble-theme', 'platform/themes/my_theme/', 'author/my_theme'),
278282
array('bonefish-package', 'Packages/bonefish/package/', 'bonefish/package'),
279283
array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'),
280284
array('chef-cookbook', 'Chef/mre/my_cookbook/', 'mre/my_cookbook'),

0 commit comments

Comments
 (0)