Showing 1,273 changed files with 37,087 additions and 29,931 deletions.
75 changes: 23 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
pull_request: ~
push:
branches:
- 4.8
- 4.9
tags:
- 4.8.*
- 4.9.*
schedule:
- cron: 0 13 * * MON,TUE

Expand All @@ -17,12 +17,12 @@ jobs:
if: github.event_name != 'schedule'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib
tools: prestissimo
coverage: xdebug
coverage: pcov

- name: Checkout
uses: actions/checkout@v2
Expand All @@ -33,12 +33,7 @@ jobs:
composer install --no-interaction --no-suggest
- name: Generate the coverage report
run: |
vendor/bin/phpunit -c calendar-bundle --coverage-clover=calendar-bundle.xml --colors=always
vendor/bin/phpunit -c core-bundle --exclude-group contao3 --coverage-clover=core-bundle.xml --colors=always
vendor/bin/phpunit -c faq-bundle --coverage-clover=faq-bundle.xml --colors=always
vendor/bin/phpunit -c manager-bundle --coverage-clover=manager-bundle.xml --colors=always
vendor/bin/phpunit -c news-bundle --coverage-clover=news-bundle.xml --colors=always
run: php -d pcov.enabled=1 vendor/bin/phpunit --testsuite=coverage --coverage-clover=clover.xml --colors=always

- name: Upload the coverage report
uses: codecov/codecov-action@v1
Expand All @@ -62,7 +57,7 @@ jobs:
# * If you have an idea how to solve this in a better way, please
# let us know.
token: e129b38e-acf2-484c-97bc-1cde6b4a0693
file: '*-bundle.xml'
file: ./clover.xml
fail_ci_if_error: true

coding-style:
Expand All @@ -71,7 +66,7 @@ jobs:
if: github.event_name == 'pull_request'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib
Expand All @@ -88,9 +83,9 @@ jobs:
- name: Check the coding style
run: |
PHP_CS_CONFIG=default vendor/bin/php-cs-fixer fix --diff --diff-format=udiff --dry-run
PHP_CS_CONFIG=legacy vendor/bin/php-cs-fixer fix --diff --diff-format=udiff --dry-run
PHP_CS_CONFIG=template vendor/bin/php-cs-fixer fix --diff --diff-format=udiff --dry-run
vendor/bin/ecs check *-bundle/bin *-bundle/src *-bundle/tests --config vendor/contao/easy-coding-standard/config/default.yaml --no-progress-bar --ansi
vendor/bin/ecs check *-bundle/src/Resources/contao --config vendor/contao/easy-coding-standard/config/legacy.yaml --no-progress-bar --ansi
vendor/bin/ecs check *-bundle/src/Resources/contao/templates --config vendor/contao/easy-coding-standard/config/template.yaml --no-progress-bar --ansi
- name: Analyze the code
run: vendor/bin/phpstan analyse core-bundle/src core-bundle/tests --level=3 --no-progress
Expand All @@ -102,10 +97,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.1, 7.2, 7.3, 7.4]
php: [7.2, 7.3, 7.4]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
Expand All @@ -124,29 +119,20 @@ jobs:
composer install --no-interaction --no-suggest
- name: Run the unit tests
run: |
vendor/bin/phpunit -c calendar-bundle --colors=always
vendor/bin/phpunit -c core-bundle --colors=always
vendor/bin/phpunit -c faq-bundle --colors=always
vendor/bin/phpunit -c installation-bundle --colors=always
vendor/bin/phpunit -c manager-bundle --colors=always
vendor/bin/phpunit -c news-bundle --colors=always
run: vendor/bin/phpunit --colors=always

- name: Run the functional tests
run: vendor/bin/phpunit -c core-bundle --testsuite=functional --colors=always
run: vendor/bin/phpunit --testsuite=functional --colors=always
env:
DB_HOST: localhost
DB_USER: root
DB_PASS: root
DB_NAME: contao_test
DATABASE_URL: mysql://root:root@localhost:3306/contao_test

prefer-lowest:
name: Prefer Lowest
runs-on: ubuntu-latest
if: github.event_name != 'push'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
Expand All @@ -165,29 +151,20 @@ jobs:
composer update --prefer-lowest --prefer-stable --no-interaction --no-suggest
- name: Run the unit tests
run: |
vendor/bin/phpunit -c calendar-bundle --colors=always
vendor/bin/phpunit -c core-bundle --colors=always
vendor/bin/phpunit -c faq-bundle --colors=always
vendor/bin/phpunit -c installation-bundle --colors=always
vendor/bin/phpunit -c manager-bundle --colors=always
vendor/bin/phpunit -c news-bundle --colors=always
run: vendor/bin/phpunit --colors=always

- name: Run the functional tests
run: vendor/bin/phpunit -c core-bundle --testsuite=functional --colors=always
run: vendor/bin/phpunit --testsuite=functional --colors=always
env:
DB_HOST: localhost
DB_USER: root
DB_PASS: root
DB_NAME: contao_test
DATABASE_URL: mysql://root:root@localhost:3306/contao_test

bundles:
name: Bundles
runs-on: ubuntu-latest
if: github.event_name != 'push'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib
Expand Down Expand Up @@ -226,7 +203,7 @@ jobs:
if: github.event_name != 'push'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
Expand All @@ -246,21 +223,15 @@ jobs:
composer install --no-interaction --no-suggest --no-progress
- name: Run the unit tests
run: |
vendor/bin/phpunit.bat -c calendar-bundle --colors=always
vendor/bin/phpunit.bat -c core-bundle --colors=always
vendor/bin/phpunit.bat -c faq-bundle --colors=always
vendor/bin/phpunit.bat -c installation-bundle --colors=always
vendor/bin/phpunit.bat -c manager-bundle --colors=always
vendor/bin/phpunit.bat -c news-bundle --colors=always
run: vendor/bin/phpunit.bat --colors=always

monorepo-split:
name: Monorepo Split
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
extensions: json, zlib
Expand Down
76 changes: 0 additions & 76 deletions .php_cs.dist

This file was deleted.

51 changes: 51 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
extends: default

ignore: |
/node_modules/
/vendor/

rules:
braces:
min-spaces-inside: 1
max-spaces-inside: 1

brackets:
min-spaces-inside: 0
max-spaces-inside: 0

colons:
max-spaces-before: 0
max-spaces-after: 1

commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1

comments:
min-spaces-from-content: 1
require-starting-space: true
ignore-shebangs: true

document-start: disable

empty-lines:
max: 1

empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true

hyphens:
max-spaces-after: 1

indentation:
spaces: 4
indent-sequences: true

line-length: disable

octal-values:
forbid-implicit-octal: true

truthy: disable
Loading