Merge branch 'release/v1.0' into dev
This commit is contained in:
commit
60d2972bb2
11 changed files with 72 additions and 45 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<ruleset name="SS3">
|
<ruleset name="Custom">
|
||||||
<description>Coding standard for SilverStripe 4.x</description>
|
<description>A custom coding standard</description>
|
||||||
|
|
||||||
<!-- Don't sniff third party libraries -->
|
<!-- Don't sniff third party libraries -->
|
||||||
<exclude-pattern>*/themes/simple/*</exclude-pattern>
|
<exclude-pattern>*/themes/simple/*</exclude-pattern>
|
||||||
|
@ -10,16 +10,24 @@
|
||||||
<!-- Show progress and output sniff names on violation, and add colours -->
|
<!-- Show progress and output sniff names on violation, and add colours -->
|
||||||
<arg value="sp"/>
|
<arg value="sp"/>
|
||||||
<arg name="colors"/>
|
<arg name="colors"/>
|
||||||
|
<arg name="report" value="csv"/>
|
||||||
|
<arg name="extensions" value="php/php,inc/php"/>
|
||||||
|
|
||||||
<!-- Use PSR-2 as a base standard -->
|
<!-- Use PSR-2 as a base standard -->
|
||||||
<rule ref="PSR2">
|
<rule ref="PSR2">
|
||||||
|
<!-- Allow Windows-like EOL-characters -->
|
||||||
|
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
|
||||||
<!-- Allow classes to not declare a namespace -->
|
<!-- Allow classes to not declare a namespace -->
|
||||||
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
|
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
|
||||||
|
<!-- Allow namespaces without a following EOL-character -->
|
||||||
|
<exclude name="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/>
|
||||||
|
<!-- Allow files to have no EOL-character at the end of the file -->
|
||||||
|
<exclude name="PSR2.Files.EndFileNewline.NoneFound"/>
|
||||||
<!-- Allow underscores in class names -->
|
<!-- Allow underscores in class names -->
|
||||||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
|
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
|
||||||
|
|
||||||
<!-- Allow non camel cased method names -->
|
<!-- Allow non camel cased method names -->
|
||||||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
|
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
<!-- Force files to have no EOL-character at the end of file -->
|
||||||
|
<rule ref="Generic.Files.EndFileNoNewline.Found"/>
|
||||||
</ruleset>
|
</ruleset>
|
|
@ -6,4 +6,4 @@ use SilverStripe\Security\Member;
|
||||||
// remove PasswordValidator for SilverStripe 5.0
|
// remove PasswordValidator for SilverStripe 5.0
|
||||||
$validator = PasswordValidator::create();
|
$validator = PasswordValidator::create();
|
||||||
// Settings are registered via Injector configuration - see passwords.yml in framework
|
// Settings are registered via Injector configuration - see passwords.yml in framework
|
||||||
Member::set_password_validator($validator);
|
Member::set_password_validator($validator);
|
|
@ -10,6 +10,4 @@ namespace
|
||||||
|
|
||||||
private static $has_one = [];
|
private static $has_one = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
|
@ -30,4 +30,4 @@ namespace {
|
||||||
// See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/
|
// See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -39,7 +39,6 @@ RUN mv composer.phar /usr/local/bin/composer
|
||||||
COPY --chown=www-data:www-data ./composer.* ./
|
COPY --chown=www-data:www-data ./composer.* ./
|
||||||
RUN sudo -u www-data mkdir public
|
RUN sudo -u www-data mkdir public
|
||||||
RUN sudo -u www-data composer install
|
RUN sudo -u www-data composer install
|
||||||
RUN ./vendor/bin/sake installsake
|
|
||||||
|
|
||||||
COPY .docker/xdebug.ini $PHP_INI_DIR/conf.d/
|
COPY .docker/xdebug.ini $PHP_INI_DIR/conf.d/
|
||||||
COPY .docker/date.ini $PHP_INI_DIR/conf.d/
|
COPY .docker/date.ini $PHP_INI_DIR/conf.d/
|
|
@ -1,8 +1,40 @@
|
||||||
{
|
{
|
||||||
"name": "manuth/nuth.ch",
|
"name": "manuth/nuth.ch",
|
||||||
"type": "silverstripe-recipe",
|
"type": "silverstripe-recipe",
|
||||||
"description": "The source code of nuth.ch",
|
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
|
"description": "The source code of nuth.ch",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Manuel Thalmann",
|
||||||
|
"email": "m@nuth.ch",
|
||||||
|
"homepage": "https://nuth.ch/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"Homepage",
|
||||||
|
"Website",
|
||||||
|
"m@nuth",
|
||||||
|
"SilverStripe"
|
||||||
|
],
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.nuth.ch/manuth/nuth.ch.git"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://git.nuth.ch/manuth/nuth.ch/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://nuth.ch/",
|
||||||
|
"scripts": {
|
||||||
|
"lint": "phpcs --report=csv ."
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"process-timeout": 600
|
||||||
|
},
|
||||||
|
"prefer-stable": true,
|
||||||
|
"minimum-stability": "dev",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6.0",
|
"php": ">=5.6.0",
|
||||||
"silverstripe/recipe-plugin": "^1.2",
|
"silverstripe/recipe-plugin": "^1.2",
|
||||||
|
@ -13,9 +45,6 @@
|
||||||
"phpunit/phpunit": "^5.7",
|
"phpunit/phpunit": "^5.7",
|
||||||
"squizlabs/php_codesniffer": "*"
|
"squizlabs/php_codesniffer": "*"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"lint": "phpcs --report=csv ."
|
|
||||||
},
|
|
||||||
"extra": {
|
"extra": {
|
||||||
"project-files-installed": [
|
"project-files-installed": [
|
||||||
"app/.htaccess",
|
"app/.htaccess",
|
||||||
|
@ -31,10 +60,5 @@
|
||||||
"install.php",
|
"install.php",
|
||||||
"web.config"
|
"web.config"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"config": {
|
|
||||||
"process-timeout": 600
|
|
||||||
},
|
|
||||||
"prefer-stable": true,
|
|
||||||
"minimum-stability": "dev"
|
|
||||||
}
|
}
|
||||||
|
|
26
composer.lock
generated
26
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "a4dcebfb359ae2174165b199f26c9ef2",
|
"content-hash": "61f2f934e1828cc882b4efaebc45fe21",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/ca-bundle",
|
"name": "composer/ca-bundle",
|
||||||
|
@ -2739,20 +2739,20 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "myclabs/deep-copy",
|
"name": "myclabs/deep-copy",
|
||||||
"version": "1.9.0",
|
"version": "1.9.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||||
"reference": "78af75148f9fdd34ea727c8b529a9b4a8f7b740c"
|
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/78af75148f9fdd34ea727c8b529a9b4a8f7b740c",
|
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
|
||||||
"reference": "78af75148f9fdd34ea727c8b529a9b4a8f7b740c",
|
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2"
|
"php": "^7.1"
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"myclabs/deep-copy": "self.version"
|
"myclabs/deep-copy": "self.version"
|
||||||
|
@ -2760,8 +2760,6 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/collections": "^1.0",
|
"doctrine/collections": "^1.0",
|
||||||
"doctrine/common": "^2.6",
|
"doctrine/common": "^2.6",
|
||||||
"phpstan/phpstan": "^0.9.2",
|
|
||||||
"phpstan/phpstan-phpunit": "^0.9.4",
|
|
||||||
"phpunit/phpunit": "^7.1"
|
"phpunit/phpunit": "^7.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
@ -2785,7 +2783,7 @@
|
||||||
"object",
|
"object",
|
||||||
"object graph"
|
"object graph"
|
||||||
],
|
],
|
||||||
"time": "2018-10-30T00:14:44+00:00"
|
"time": "2019-04-07T13:18:21+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-common",
|
"name": "phpdocumentor/reflection-common",
|
||||||
|
@ -3908,16 +3906,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "squizlabs/php_codesniffer",
|
"name": "squizlabs/php_codesniffer",
|
||||||
"version": "3.4.1",
|
"version": "3.4.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||||
"reference": "5b4333b4010625d29580eb4a41f1e53251be6baa"
|
"reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5b4333b4010625d29580eb4a41f1e53251be6baa",
|
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
|
||||||
"reference": "5b4333b4010625d29580eb4a41f1e53251be6baa",
|
"reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3955,7 +3953,7 @@
|
||||||
"phpcs",
|
"phpcs",
|
||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"time": "2019-03-19T03:22:27+00:00"
|
"time": "2019-04-10T23:49:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "webmozart/assert",
|
"name": "webmozart/assert",
|
||||||
|
|
1
db.Dockerfile
Normal file
1
db.Dockerfile
Normal file
|
@ -0,0 +1 @@
|
||||||
|
FROM mysql:5
|
|
@ -6,7 +6,7 @@ services:
|
||||||
cms:
|
cms:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./Dockerfile
|
dockerfile: ./cms.Dockerfile
|
||||||
networks:
|
networks:
|
||||||
- nuth
|
- nuth
|
||||||
ports:
|
ports:
|
||||||
|
@ -14,7 +14,9 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
db:
|
db:
|
||||||
image: mysql:5
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./db.Dockerfile
|
||||||
networks:
|
networks:
|
||||||
- nuth
|
- nuth
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -16,4 +16,4 @@ $kernel = new CoreKernel(BASE_PATH);
|
||||||
$app = new HTTPApplication($kernel);
|
$app = new HTTPApplication($kernel);
|
||||||
$app->addMiddleware(new ErrorControlChainMiddleware($app));
|
$app->addMiddleware(new ErrorControlChainMiddleware($app));
|
||||||
$response = $app->handle($request);
|
$response = $app->handle($request);
|
||||||
$response->output();
|
$response->output();
|
|
@ -1,16 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
appDir=$(dirname $(dirname $0))
|
||||||
destinationDir=$(pwd)
|
destinationDir=$(pwd)
|
||||||
tempDir=$(mktemp -d)
|
tempDir=$(mktemp -d)
|
||||||
sourceDir="."
|
|
||||||
|
|
||||||
cd $(dirname $0)
|
rsync -a --delete $appDir/ $tempDir
|
||||||
cd ..
|
|
||||||
|
|
||||||
rsync -a --delete $sourceDir/ $tempDir
|
|
||||||
|
|
||||||
# Cleaning up the built website
|
# Cleaning up the built website
|
||||||
find $tempDir \
|
find $tempDir \
|
||||||
-mindepth 1 -and \
|
-mindepth 1 -maxdepth 1 -and \
|
||||||
-name "*" -and \
|
-name "*" -and \
|
||||||
-not \( \
|
-not \( \
|
||||||
\( \
|
\( \
|
||||||
|
@ -26,7 +23,7 @@ find $tempDir \
|
||||||
|
|
||||||
# Cleaning up the destination directory
|
# Cleaning up the destination directory
|
||||||
find $destinationDir \
|
find $destinationDir \
|
||||||
-mindepth 1 -and \
|
-mindepth 1 -maxdepth 1 -and \
|
||||||
-name "*" -and \
|
-name "*" -and \
|
||||||
-not -name ".env" \
|
-not -name ".env" \
|
||||||
-exec rm -rf {} +
|
-exec rm -rf {} +
|
||||||
|
@ -37,4 +34,4 @@ rsync -a $tempDir/ $destinationDir
|
||||||
# Installing the website
|
# Installing the website
|
||||||
cd $destinationDir
|
cd $destinationDir
|
||||||
composer install
|
composer install
|
||||||
./vendor/bin/sake dev/build
|
composer exec -- sake dev/build
|
Loading…
Reference in a new issue