mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-06-13 16:29:07 +02:00
Merge remote-tracking branch 'origin/4'
This commit is contained in:
commit
543757f640
|
@ -8,8 +8,8 @@
|
|||
"silverstripe"
|
||||
],
|
||||
"tests": [
|
||||
"vendor/bin/phpunit framework/tests/php",
|
||||
"vendor/bin/phpunit cms/tests"
|
||||
"vendor/bin/phpunit vendor/silverstripe/framework/tests/php",
|
||||
"vendor/bin/phpunit vendor/silverstripe/cms/tests/php"
|
||||
],
|
||||
"exclude": [
|
||||
"silverstripe/recipe-plugin"
|
||||
|
|
23
.gitignore
vendored
23
.gitignore
vendored
|
@ -1,26 +1,5 @@
|
|||
# ignore cache folder
|
||||
/silverstripe-cache/
|
||||
|
||||
# ignore .env file
|
||||
/.env
|
||||
|
||||
# ignore build tools
|
||||
/tools/phing-metadata
|
||||
|
||||
# ignore composer vendor folder
|
||||
/vendor/
|
||||
|
||||
# ignore default modules from composer
|
||||
/asset-admin/
|
||||
/campaign-admin/
|
||||
/cms/
|
||||
/framework/
|
||||
/graphql/
|
||||
/reports/
|
||||
/silverstripe-admin/
|
||||
/silverstripe-assets/
|
||||
/silverstripe-errorpage/
|
||||
/siteconfig/
|
||||
/themes/simple/
|
||||
/versioned/
|
||||
/testsession/
|
||||
/resources/
|
26
.travis.yml
26
.travis.yml
|
@ -1,6 +1,10 @@
|
|||
language: php
|
||||
|
||||
sudo: false
|
||||
dist: trusty
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache/files
|
||||
|
||||
addons:
|
||||
firefox: "31.0"
|
||||
|
@ -54,30 +58,21 @@ matrix:
|
|||
|
||||
before_script:
|
||||
# Init PHP
|
||||
- export CORE_RELEASE=$TRAVIS_BRANCH
|
||||
- printf "\n" | pecl install imagick
|
||||
- phpenv rehash
|
||||
- phpenv config-rm xdebug.ini
|
||||
- phpenv config-rm xdebug.ini || true
|
||||
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
|
||||
# Temporarily update to 1.5.x-dev of composer
|
||||
- composer self-update --snapshot
|
||||
|
||||
# Install composer dependencies
|
||||
- composer validate
|
||||
- composer install --prefer-dist
|
||||
- composer require --no-update --prefer-dist symfony/config:^3.2 silverstripe/framework 4.0.x-dev silverstripe/config:1.0.x-dev embed/embed ^3.0 silverstripe/admin:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev silverstripe/cms:4.0.x-dev silverstripe/asset-admin:1.0.x-dev silverstripe/campaign-admin:1.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/reports:4.0.x-dev silverstripe/graphql:dev-master
|
||||
- composer update
|
||||
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi
|
||||
- if [[ $BEHAT_TEST ]]; then composer require silverstripe/behat-extension:^3 silverstripe/serve:dev-master se/selenium-server-standalone:2.41.0; fi;
|
||||
|
||||
# Replace _config.php bootstrapping with test environment
|
||||
- rm -rf ./mysite
|
||||
- php ./cms/tests/bootstrap/mysite.php
|
||||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
|
||||
- if [[ $BEHAT_TEST ]]; then composer require --no-update silverstripe/behat-extension:^3 silverstripe/serve:dev-master se/selenium-server-standalone:2.41.0; fi;
|
||||
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||
|
||||
# Start behat services
|
||||
- if [[ $BEHAT_TEST ]]; then echo 'SS_BASE_URL=http://localhost:8080/' >> .env; fi
|
||||
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi
|
||||
- if [[ $BEHAT_TEST ]]; then cp composer.lock artifacts/; fi
|
||||
- if [[ $BEHAT_TEST ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi
|
||||
- if [[ $BEHAT_TEST ]]; then (vendor/bin/selenium-server-standalone > artifacts/selenium.log 2>&1 &); fi
|
||||
- if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file cms/tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi
|
||||
|
@ -91,4 +86,3 @@ after_failure:
|
|||
|
||||
notifications:
|
||||
slack: silverstripeltd:Cls1xnypKBLFhv0YIRtNLzlQ
|
||||
|
||||
|
|
7
assets/.htaccess
Executable file → Normal file
7
assets/.htaccess
Executable file → Normal file
|
@ -5,7 +5,10 @@
|
|||
#
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
SetEnv HTTP_MOD_REWRITE On
|
||||
<IfModule mod_env.c>
|
||||
SetEnv HTTP_MOD_REWRITE On
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Disable PHP handler
|
||||
|
@ -23,5 +26,5 @@
|
|||
# Non existant files passed to requesthandler
|
||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule .* ../framework/main.php?url=%1 [QSA]
|
||||
RewriteRule .* ../index.php [QSA]
|
||||
</IfModule>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# ========================================================================= #
|
||||
# composer require silverstripe/behat-extension:^3 silverstripe/serve:dev-master se/selenium-server-standalone:2.41.0
|
||||
# vendor/bin/selenium-server-standalone -Dwebdriver.firefox.bin="/Applications/Firefox31.app/Contents/MacOS/firefox-bin"
|
||||
# vendor/bin/serve --bootstrap-file cms/tests/behat/serve-bootstrap.php
|
||||
# vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php
|
||||
# vendor/bin/behat @<module>
|
||||
# ========================================================================= #
|
||||
default:
|
||||
|
@ -16,5 +16,6 @@ default:
|
|||
selenium2:
|
||||
browser: firefox
|
||||
SilverStripe\BehatExtension\Extension:
|
||||
bootstrap_file: cms/tests/behat/serve-bootstrap.php
|
||||
bootstrap_file: vendor/silverstripe/cms/tests/behat/serve-bootstrap.php
|
||||
screenshot_path: %paths.base%/artifacts/screenshots
|
||||
retry_seconds: 4 # default is 2
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"require": {
|
||||
"php": ">=5.6.0",
|
||||
"silverstripe/recipe-plugin": ">=0.1@dev <1.0",
|
||||
"silverstripe/recipe-cms": "1.0.x-dev",
|
||||
"silverstripe/recipe-cms": "1.1.x-dev",
|
||||
"silverstripe-themes/simple": "~3.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@ -15,14 +15,10 @@
|
|||
"project-files": [
|
||||
"assets/*",
|
||||
"mysite/_config/*",
|
||||
"index.php",
|
||||
"install.php",
|
||||
".env.example",
|
||||
"favicon.ico",
|
||||
"install-frameworkmissing.html"
|
||||
"favicon.ico"
|
||||
],
|
||||
"branch-alias": {
|
||||
"4.x-dev": "4.0.x-dev",
|
||||
"dev-master": "5.x-dev"
|
||||
}
|
||||
},
|
||||
|
|
68
index.php
68
index.php
|
@ -1,68 +0,0 @@
|
|||
<?php
|
||||
|
||||
/************************************************************************************
|
||||
************************************************************************************
|
||||
** **
|
||||
** If you can read this text in your browser then you don't have PHP installed. **
|
||||
** Please install PHP 5.6.0 or higher. **
|
||||
** **
|
||||
************************************************************************************
|
||||
************************************************************************************/
|
||||
|
||||
/**
|
||||
* This script bolts on top of SilverStripe to allow access without the use of .htaccess
|
||||
* rewriting rules.
|
||||
*/
|
||||
|
||||
// This is the URL of the script that everything must be viewed with.
|
||||
define('BASE_SCRIPT_URL', 'index.php/');
|
||||
|
||||
$ruLen = strlen($_SERVER['REQUEST_URI']);
|
||||
$snLen = strlen($_SERVER['SCRIPT_NAME']);
|
||||
|
||||
$isIIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false);
|
||||
|
||||
// IIS will populate server variables using one of these two ways
|
||||
if ($isIIS) {
|
||||
if ($_SERVER['REQUEST_URI'] == $_SERVER['SCRIPT_NAME']) {
|
||||
$url = "";
|
||||
} elseif ($ruLen > $snLen && substr($_SERVER['REQUEST_URI'], 0, $snLen + 1) == ($_SERVER['SCRIPT_NAME'] . '/')) {
|
||||
$url = substr($_SERVER['REQUEST_URI'], $snLen + 1);
|
||||
$url = strtok($url, '?');
|
||||
} else {
|
||||
$url = $_SERVER['REQUEST_URI'];
|
||||
if ($url[0] == '/') {
|
||||
$url = substr($url, 1);
|
||||
}
|
||||
$url = strtok($url, '?');
|
||||
}
|
||||
|
||||
// Apache will populate the server variables this way
|
||||
} else {
|
||||
if ($ruLen > $snLen && substr($_SERVER['REQUEST_URI'], 0, $snLen + 1) == ($_SERVER['SCRIPT_NAME'] . '/')) {
|
||||
$url = substr($_SERVER['REQUEST_URI'], $snLen + 1);
|
||||
$url = strtok($url, '?');
|
||||
} else {
|
||||
$url = "";
|
||||
}
|
||||
}
|
||||
|
||||
$_GET['url'] = $_REQUEST['url'] = $url;
|
||||
|
||||
$fileName = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $url;
|
||||
|
||||
/**
|
||||
* This code is a very simple wrapper for sending files
|
||||
* Very quickly pass through references to files
|
||||
*/
|
||||
if ($url && file_exists($fileName)) {
|
||||
$fileURL = (dirname($_SERVER['SCRIPT_NAME']) == '/' ? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $url;
|
||||
if (isset($_SERVER['QUERY_STRING'])) {
|
||||
$fileURL .= '?' . $_SERVER['QUERY_STRING'];
|
||||
}
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
|
||||
header("Location: $fileURL");
|
||||
die();
|
||||
}
|
||||
|
||||
require_once 'framework/main.php';
|
|
@ -1,35 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>The SilverStripe Framework is missing</title>
|
||||
<link rel="stylesheet" type="text/css" href="framework/dev/install/css/install.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="BgContainer">
|
||||
<div id="Container">
|
||||
<div id="Header">
|
||||
<h1>SilverStripe CMS Installation</h1>
|
||||
</div>
|
||||
|
||||
<div id="Navigation"> </div>
|
||||
<div class="clear"><!-- --></div>
|
||||
|
||||
<div id="Layout">
|
||||
<div class="typography">
|
||||
<p><strong>The SilverStripe Framework is missing</strong> - To run the installer, at least the <strong>framework</strong> module is required.</p>
|
||||
|
||||
<p>If you downloaded a pre-packaged zip or tar.gz, something might have gone wrong with the packaging
|
||||
process. Please try re-downloading, or try an older version.</p>
|
||||
|
||||
<p>If you downloaded this from <a href="https://github.com/silverstripe">GitHub</a>, you need to install the <strong>framework</strong> module. You can do this manually, or by running the tools/new-project script from the command line.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"><!-- --></div>
|
||||
</div>
|
||||
|
||||
<div id="Footer">
|
||||
<div class="footerTop"><!-- --></div>
|
||||
<p><a href="http://silverstripe.org">SilverStripe Open Source CMS</a> | Copyright © 2008-2011 SilverStripe Limited</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
16
install.php
16
install.php
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
/************************************************************************************
|
||||
************************************************************************************
|
||||
** **
|
||||
** If you can read this text in your browser then you don't have PHP installed. **
|
||||
** Please install PHP 5.6.0 or higher. **
|
||||
** **
|
||||
************************************************************************************
|
||||
************************************************************************************/
|
||||
|
||||
if (!file_exists('framework') || !file_exists('framework/_config.php')) {
|
||||
include 'install-frameworkmissing.html';
|
||||
} else {
|
||||
include './framework/src/Dev/Install/install.php';
|
||||
}
|
|
@ -16,30 +16,30 @@
|
|||
|
||||
It is safe to remove this file for normal website operation.
|
||||
-->
|
||||
<phpunit bootstrap="framework/tests/bootstrap.php" colors="true">
|
||||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
||||
|
||||
<testsuite name="Default">
|
||||
<directory>mysite/tests</directory>
|
||||
<directory>cms/tests</directory>
|
||||
<directory>framework/tests</directory>
|
||||
<directory>vendor/silverstripe/cms/tests/php</directory>
|
||||
<directory>vendor/silverstripe/framework/tests/php</directory>
|
||||
</testsuite>
|
||||
|
||||
<!-- core components -->
|
||||
<testsuite name="core">
|
||||
<directory>framework/tests/php/</directory>
|
||||
<directory>silverstripe-assets/tests/php/</directory>
|
||||
<directory>versioned/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/framework/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/assets/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/versioned/tests/php/</directory>
|
||||
</testsuite>
|
||||
|
||||
<!-- admin components -->
|
||||
<testsuite name="admin">
|
||||
<directory>cms/tests/</directory>
|
||||
<directory>silverstripe-admin/tests/php/</directory>
|
||||
<directory>campaign-admin/tests/php/</directory>
|
||||
<directory>asset-admin/tests/php/</directory>
|
||||
<directory>graphql/tests/</directory>
|
||||
<directory>siteconfig/tests/</directory>
|
||||
<directory>reports/tests/</directory>
|
||||
<directory>vendor/silverstripe/cms/tests/</directory>
|
||||
<directory>vendor/silverstripe/admin/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/campaign-admin/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/asset-admin/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/graphql/tests/</directory>
|
||||
<directory>vendor/silverstripe/siteconfig/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/reports/tests/</directory>
|
||||
</testsuite>
|
||||
|
||||
<groups>
|
||||
|
|
Loading…
Reference in New Issue
Block a user