plugin updates
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
class BotbleInstaller extends BaseInstaller
|
||||
{
|
||||
/** @var array<string, string> */
|
||||
protected $locations = array(
|
||||
'plugin' => 'platform/plugins/{$name}/',
|
||||
'theme' => 'platform/themes/{$name}/',
|
||||
);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class CakePHPInstaller extends BaseInstaller
|
||||
/**
|
||||
* Check if CakePHP version matches against a version
|
||||
*
|
||||
* @phpstan-param Constraint::STR_OP_* $matcher
|
||||
* @phpstan-param '='|'=='|'<'|'<='|'>'|'>='|'<>'|'!=' $matcher
|
||||
*/
|
||||
protected function matchesCakeVersion(string $matcher, string $version): bool
|
||||
{
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ConcreteCMSInstaller extends BaseInstaller
|
||||
{
|
||||
/** @var array<string, string> */
|
||||
protected $locations = array(
|
||||
'core' => 'concrete/',
|
||||
'block' => 'application/blocks/{$name}/',
|
||||
'package' => 'packages/{$name}/',
|
||||
'theme' => 'application/themes/{$name}/',
|
||||
'update' => 'updates/{$name}/',
|
||||
);
|
||||
}
|
||||
@@ -20,5 +20,6 @@ class DrupalInstaller extends BaseInstaller
|
||||
'console' => 'console/{$name}/',
|
||||
'console-language' => 'console/language/{$name}/',
|
||||
'config' => 'config/sync/',
|
||||
'recipe' => 'recipes/{$name}',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace Composer\Installers;
|
||||
|
||||
class ForkCMSInstaller extends BaseInstaller
|
||||
{
|
||||
/** @var array<string, string> */
|
||||
protected $locations = [
|
||||
'module' => 'src/Modules/{$name}/',
|
||||
'theme' => 'src/Themes/{$name}/'
|
||||
];
|
||||
|
||||
/**
|
||||
* Format package name.
|
||||
*
|
||||
* For package type fork-cms-module, cut off a trailing '-plugin' if present.
|
||||
*
|
||||
* For package type fork-cms-theme, cut off a trailing '-theme' if present.
|
||||
*/
|
||||
public function inflectPackageVars(array $vars): array
|
||||
{
|
||||
if ($vars['type'] === 'fork-cms-module') {
|
||||
return $this->inflectModuleVars($vars);
|
||||
}
|
||||
|
||||
if ($vars['type'] === 'fork-cms-theme') {
|
||||
return $this->inflectThemeVars($vars);
|
||||
}
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, string> $vars
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function inflectModuleVars(array $vars): array
|
||||
{
|
||||
$vars['name'] = $this->pregReplace('/^fork-cms-|-module|ForkCMS|ForkCms|Forkcms|forkcms|Module$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make module name camelcased
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, string> $vars
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function inflectThemeVars(array $vars): array
|
||||
{
|
||||
$vars['name'] = $this->pregReplace('/^fork-cms-|-theme|ForkCMS|ForkCms|Forkcms|forkcms|Theme$/', '', $vars['name']);
|
||||
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
|
||||
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make theme name camelcased
|
||||
|
||||
return $vars;
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ class Installer extends LibraryInstaller
|
||||
'agl' => 'AglInstaller',
|
||||
'annotatecms' => 'AnnotateCmsInstaller',
|
||||
'bitrix' => 'BitrixInstaller',
|
||||
'botble' => 'BotbleInstaller',
|
||||
'bonefish' => 'BonefishInstaller',
|
||||
'cakephp' => 'CakePHPInstaller',
|
||||
'chef' => 'ChefInstaller',
|
||||
@@ -34,6 +35,7 @@ class Installer extends LibraryInstaller
|
||||
'cockpit' => 'CockpitInstaller',
|
||||
'codeigniter' => 'CodeIgniterInstaller',
|
||||
'concrete5' => 'Concrete5Installer',
|
||||
'concretecms' => 'ConcreteCMSInstaller',
|
||||
'croogo' => 'CroogoInstaller',
|
||||
'dframe' => 'DframeInstaller',
|
||||
'dokuwiki' => 'DokuWikiInstaller',
|
||||
@@ -45,6 +47,7 @@ class Installer extends LibraryInstaller
|
||||
'ee3' => 'ExpressionEngineInstaller',
|
||||
'ee2' => 'ExpressionEngineInstaller',
|
||||
'ezplatform' => 'EzPlatformInstaller',
|
||||
'fork' => 'ForkCMSInstaller',
|
||||
'fuel' => 'FuelInstaller',
|
||||
'fuelphp' => 'FuelphpInstaller',
|
||||
'grav' => 'GravInstaller',
|
||||
@@ -145,6 +148,9 @@ class Installer extends LibraryInstaller
|
||||
}
|
||||
|
||||
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
||||
/**
|
||||
* @var BaseInstaller
|
||||
*/
|
||||
$installer = new $class($package, $this->composer, $this->getIO());
|
||||
|
||||
$path = $installer->getInstallPath($package, $frameworkType);
|
||||
@@ -178,6 +184,8 @@ class Installer extends LibraryInstaller
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param string $packageType
|
||||
*/
|
||||
public function supports($packageType)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ class MoodleInstaller extends BaseInstaller
|
||||
'cachestore' => 'cache/stores/{$name}/',
|
||||
'cachelock' => 'cache/locks/{$name}/',
|
||||
'calendartype' => 'calendar/type/{$name}/',
|
||||
'communication' => 'communication/provider/{$name}/',
|
||||
'customfield' => 'customfield/field/{$name}/',
|
||||
'fileconverter' => 'files/converter/{$name}/',
|
||||
'format' => 'course/format/{$name}/',
|
||||
@@ -33,20 +34,24 @@ class MoodleInstaller extends BaseInstaller
|
||||
'editor' => 'lib/editor/{$name}/',
|
||||
'enrol' => 'enrol/{$name}/',
|
||||
'filter' => 'filter/{$name}/',
|
||||
'forumreport' => 'mod/forum/report/{$name}/',
|
||||
'gradeexport' => 'grade/export/{$name}/',
|
||||
'gradeimport' => 'grade/import/{$name}/',
|
||||
'gradereport' => 'grade/report/{$name}/',
|
||||
'gradingform' => 'grade/grading/form/{$name}/',
|
||||
'h5plib' => 'h5p/h5plib/{$name}/',
|
||||
'local' => 'local/{$name}/',
|
||||
'logstore' => 'admin/tool/log/store/{$name}/',
|
||||
'ltisource' => 'mod/lti/source/{$name}/',
|
||||
'ltiservice' => 'mod/lti/service/{$name}/',
|
||||
'media' => 'media/player/{$name}/',
|
||||
'message' => 'message/output/{$name}/',
|
||||
'mlbackend' => 'lib/mlbackend/{$name}/',
|
||||
'mnetservice' => 'mnet/service/{$name}/',
|
||||
'paygw' => 'payment/gateway/{$name}/',
|
||||
'plagiarism' => 'plagiarism/{$name}/',
|
||||
'portfolio' => 'portfolio/{$name}/',
|
||||
'qbank' => 'question/bank/{$name}/',
|
||||
'qbehaviour' => 'question/behaviour/{$name}/',
|
||||
'qformat' => 'question/format/{$name}/',
|
||||
'qtype' => 'question/type/{$name}/',
|
||||
@@ -57,6 +62,7 @@ class MoodleInstaller extends BaseInstaller
|
||||
'scormreport' => 'mod/scorm/report/{$name}/',
|
||||
'search' => 'search/engine/{$name}/',
|
||||
'theme' => 'theme/{$name}/',
|
||||
'tiny' => 'lib/editor/tiny/plugins/{$name}/',
|
||||
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
|
||||
'profilefield' => 'user/profile/field/{$name}/',
|
||||
'webservice' => 'webservice/{$name}/',
|
||||
|
||||
Reference in New Issue
Block a user