Skip to content

Commit f626998

Browse files
authored
Merge pull request #99 from TYPO3GmbH/master
2 parents 707dc47 + 2a5e943 commit f626998

37 files changed

+1049
-143
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_style = space
11+
indent_size = 4
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Folders
2+
/.github export-ignore
3+
4+
# Files
5+
.editorconfig export-ignore
6+
.gitattributes export-ignore
7+
.gitignore export-ignore
8+
.php_cs.dist export-ignore
9+
.phplint.yml export-ignore
10+
phpunit.xml.dist export-ignore
11+
12+
# Enforce checkout with linux lf consistent over all plattforms
13+
.php_cs.dist text eol=lf
14+
*.json text eol=lf
15+
*.md text eol=lf
16+
*.php text eol=lf
17+
*.xml text eol=lf
18+
*.yml text eol=lf

.github/workflows/ci.yml

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,56 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
build-php:
7-
name: Build PHP
8-
runs-on: ubuntu-latest
9-
strategy:
10-
max-parallel: 6
11-
fail-fast: false
12-
matrix:
13-
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
14-
steps:
15-
- name: Check out the repository
16-
uses: actions/checkout@v1
17-
- name: Setup PHP version and composer
18-
uses: shivammathur/setup-php@master
19-
with:
20-
php-version: ${{ matrix.php-versions }}
21-
- name: Install composer dependencies
22-
run: composer install
23-
- name: Run PHP linter
24-
run: |
25-
find . -name \*.php -exec php -l {} >/dev/null \;
6+
build-php:
7+
name: PHP ${{ matrix.php-versions }} with Composer ${{ matrix.composer-versions }}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 6
11+
fail-fast: false
12+
matrix:
13+
php-versions:
14+
- "7.0"
15+
- "7.1"
16+
- "7.2"
17+
- "7.3"
18+
- "7.4"
19+
composer-versions:
20+
- "v1"
21+
- "v2"
22+
steps:
23+
- name: Checkout Code
24+
uses: actions/checkout@v2
25+
26+
- name: Setup PHP version and composer
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php-versions }}
30+
tools: composer:${{ matrix.composer-versions }}, php-cs-fixer
31+
32+
- name: Environment Check
33+
run: |
34+
php --version
35+
composer --version
36+
37+
- name: Require Composer@v1
38+
if: ${{ matrix.composer-versions == 'v1' }}
39+
run: composer require "composer/composer:^1.10" --dev --no-update
40+
41+
- name: Require Composer@v2
42+
if: ${{ matrix.composer-versions == 'v2' }}
43+
run: composer require "composer/composer:^2.0" --dev --no-update
44+
45+
- name: Install composer dependencies
46+
run: composer install
47+
48+
- name: Info
49+
run: composer info
50+
51+
- name: Lint
52+
run: composer test:php:lint
53+
54+
- name: CGL
55+
run: php-cs-fixer fix --dry-run --verbose
56+
57+
- name: Unit Tests
58+
run: composer test:php:unit

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
/.ddev
12
/vendor
23
/composer.lock
34
/res/php/autoload-include.php
45
/.php_cs.cache
6+
/.phplint.cache
7+
/.phpunit.result.cache
58
.idea/

.php_cs.dist

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
11
<?php
2+
3+
if (PHP_SAPI !== 'cli') {
4+
die('This script supports command line usage only. Please check your command.');
5+
}
6+
if (function_exists('xdebug_disable')) {
7+
xdebug_disable();
8+
}
9+
10+
$header = <<<EOF
11+
This file is part of the TYPO3 project.
12+
13+
It is free software; you can redistribute it and/or modify it under
14+
the terms of the GNU General Public License, either version 2
15+
of the License, or any later version.
16+
17+
For the full copyright and license information, please read the
18+
LICENSE.txt file that was distributed with this source code.
19+
20+
The TYPO3 project - inspiring people to share!
21+
EOF;
22+
223
return PhpCsFixer\Config::create()
324
->setRiskyAllowed(true)
425
->setRules([
526
'@PSR2' => true,
27+
'header_comment' => [
28+
'header' => $header
29+
],
630
'array_syntax' => [
731
'syntax' => 'short',
832
],
@@ -72,6 +96,7 @@ return PhpCsFixer\Config::create()
7296
->setFinder(
7397
PhpCsFixer\Finder::create()
7498
->in(__DIR__)
99+
->exclude('res')
75100
->exclude('vendor')
76101
->notName('autoload-include.php')
77102
);

.phplint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
path: ./
2+
jobs: 10
3+
cache: .phplint.cache
4+
extensions:
5+
- php
6+
exclude:
7+
- vendor

.styleci.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)