mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
Merge pull request #326 from creative-commoners/pulls/2.0/vendorise
NEW Convert to vendor module
This commit is contained in:
commit
33622c440b
@ -1,9 +1,13 @@
|
||||
inherit: true
|
||||
|
||||
checks:
|
||||
php:
|
||||
code_rating: true
|
||||
duplication: true
|
||||
php: true
|
||||
|
||||
build:
|
||||
nodes:
|
||||
analysis:
|
||||
tests:
|
||||
override: [php-scrutinizer-run]
|
||||
|
||||
filter:
|
||||
paths: [src/*, tests/*]
|
||||
|
@ -31,14 +31,11 @@ before_script:
|
||||
- phpenv config-rm xdebug.ini
|
||||
- echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
- composer validate
|
||||
- composer require silverstripe/recipe-cms 1.0.x-dev --no-update
|
||||
- composer require silverstripe/installer 4.0.x-dev --no-update
|
||||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
|
||||
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||
- echo "SS_BASE_URL=http://localhost:8080/" >> .env
|
||||
|
||||
# Bootstrap cms / mysite folder
|
||||
- php ./vendor/silverstripe/cms/tests/bootstrap/mysite.php
|
||||
|
||||
# Behat bootstrapping
|
||||
- if [[ $BEHAT_TEST ]]; then echo "" >> .env && echo "SS_BASE_URL=http://localhost:8080/" >> .env; fi
|
||||
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi
|
||||
@ -50,7 +47,7 @@ before_script:
|
||||
script:
|
||||
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
|
||||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
|
||||
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=vendor/silverstripe/framework/phpcs.xml.dist src/ tests/ ; fi
|
||||
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=vendor/silverstripe/framework/phpcs.xml.dist src tests *.php ; fi
|
||||
- if [[ $BEHAT_TEST ]]; then vendor/bin/behat @subsites; fi
|
||||
|
||||
after_success:
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "silverstripe/subsites",
|
||||
"description": "Run multiple sites from a single SilverStripe install.",
|
||||
"license": "BSD-3-Clause",
|
||||
"type": "silverstripe-module",
|
||||
"type": "silverstripe-vendormodule",
|
||||
"keywords": ["silverstripe", "subsites", "multisite"],
|
||||
"authors": [
|
||||
{
|
||||
@ -22,7 +22,7 @@
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"squizlabs/php_codesniffer": "^3.0",
|
||||
"silverstripe/behat-extension": "^3",
|
||||
"silverstripe/serve": "dev-master",
|
||||
"silverstripe/serve": "^2.0",
|
||||
"se/selenium-server-standalone": "2.41.0"
|
||||
},
|
||||
"autoload": {
|
||||
@ -34,7 +34,11 @@
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"expose": [
|
||||
"javascript",
|
||||
"css"
|
||||
]
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
|
@ -1,4 +1,4 @@
|
||||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
||||
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
|
||||
<testsuite name="Default">
|
||||
<directory>tests/php</directory>
|
||||
</testsuite>
|
||||
|
@ -10,7 +10,6 @@ use SilverStripe\CMS\Controllers\CMSPageEditController;
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
||||
use SilverStripe\Forms\HiddenField;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
@ -41,11 +40,9 @@ class LeftAndMainSubsites extends LeftAndMainExtension
|
||||
|
||||
public function init()
|
||||
{
|
||||
$module = ModuleLoader::getModule('silverstripe/subsites');
|
||||
|
||||
Requirements::css($module->getRelativeResourcePath('css/LeftAndMain_Subsites.css'));
|
||||
Requirements::javascript($module->getRelativeResourcePath('javascript/LeftAndMain_Subsites.js'));
|
||||
Requirements::javascript($module->getRelativeResourcePath('javascript/VirtualPage_Subsites.js'));
|
||||
Requirements::css('silverstripe/subsites:css/LeftAndMain_Subsites.css');
|
||||
Requirements::javascript('silverstripe/subsites:javascript/LeftAndMain_Subsites.js');
|
||||
Requirements::javascript('silverstripe/subsites:javascript/VirtualPage_Subsites.js');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -152,8 +149,7 @@ class LeftAndMainSubsites extends LeftAndMainExtension
|
||||
return false;
|
||||
}
|
||||
|
||||
$module = ModuleLoader::getModule('silverstripe/subsites');
|
||||
Requirements::javascript($module->getRelativeResourcePath('javascript/LeftAndMain_Subsites.js'));
|
||||
Requirements::javascript('silverstripe/subsites:javascript/LeftAndMain_Subsites.js');
|
||||
|
||||
$output = ArrayList::create();
|
||||
|
||||
|
@ -4,7 +4,6 @@ namespace SilverStripe\Subsites\Forms;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
||||
use SilverStripe\Forms\TreeDropdownField;
|
||||
use SilverStripe\View\Requirements;
|
||||
use SilverStripe\Subsites\State\SubsiteState;
|
||||
@ -35,8 +34,7 @@ class SubsitesTreeDropdownField extends TreeDropdownField
|
||||
{
|
||||
$html = parent::Field($properties);
|
||||
|
||||
$module = ModuleLoader::getModule('silverstripe/subsites');
|
||||
Requirements::javascript($module->getRelativeResourcePath('javascript/SubsitesTreeDropdownField.js'));
|
||||
Requirements::javascript('silverstripe/subsitesjavascript/SubsitesTreeDropdownField.js');
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user