Merge pull request #158 from robbieaverill/pulls/4.0/consistent-instance-method

API Consistent use of inst() naming across framework
This commit is contained in:
Damian Mooyman 2017-05-22 11:25:39 +12:00 committed by GitHub
commit 47bebe6c3a
3 changed files with 4 additions and 3 deletions

View File

@ -22,7 +22,8 @@ matrix:
before_script:
- composer validate
- composer install --dev --prefer-dist
- composer require --update-with-dependencies silverstripe/framework:4.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/config:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev --prefer-dist
- composer require --prefer-dist --no-update symfony/config:^3.2 silverstripe/framework:4.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/config:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev --prefer-dist
- composer update
- if [[ $PHPCS_TEST ]]; then pyrus install pear/PHP_CodeSniffer; fi
- phpenv rehash

View File

@ -32,7 +32,7 @@ class CoreInitializationPass implements CompilerPassInterface
}
// Register all paths
foreach (ModuleLoader::instance()->getManifest()->getModules() as $module) {
foreach (ModuleLoader::inst()->getManifest()->getModules() as $module) {
$container->setParameter('paths.modules.'.$module->getShortName(), $module->getPath());
$composerName = $module->getComposerName();
if ($composerName) {

View File

@ -19,7 +19,7 @@ trait ModuleCommandTrait
if (strpos($name, '@') === 0) {
$name = substr($name, 1);
}
$module = ModuleLoader::instance()->getManifest()->getModule($name);
$module = ModuleLoader::inst()->getManifest()->getModule($name);
if (!$module) {
throw new InvalidArgumentException("No module $name installed");
}