mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-09-19 23:56:13 +02:00

[CLEANUP] Autoformat all files (#175)

This will reduce unrelated autoformatting changes in other commits
(and it also makes the code more readable).
This commit is contained in:
Oliver Klee 2020-12-01 23:12:34 +01:00 committed by GitHub
parent 0d09a2f0ac
commit 2344557abc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 477 additions and 504 deletions

View file

@ -33,29 +33,24 @@ jobs:
name: "Code quality checks" name: "Code quality checks"
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- - name: "Checkout"
name: "Checkout"
uses: actions/checkout@v2 uses: actions/checkout@v2
- - name: "Install PHP"
name: "Install PHP"
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: "${{ matrix.php-version }}" php-version: "${{ matrix.php-version }}"
tools: composer:v2 tools: composer:v2
- name: "Show Composer version" - name: "Show Composer version"
run: composer --version run: composer --version
- - name: "Cache dependencies installed with composer"
name: "Cache dependencies installed with composer"
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.composer/cache path: ~/.composer/cache
restore-keys: "php${{ matrix.php-version }}-composer-\n" restore-keys: "php${{ matrix.php-version }}-composer-\n"
- - name: "Install Composer dependencies"
name: "Install Composer dependencies"
run: "composer install --no-progress" run: "composer install --no-progress"
- - name: "Run command"
name: "Run command"
run: "composer ci:${{ matrix.command }}" run: "composer ci:${{ matrix.command }}"
strategy: strategy:
matrix: matrix:
@ -77,32 +72,25 @@ jobs:
- "style" - "style"
- "js" - "js"
steps: steps:
- - name: "Checkout"
name: "Checkout"
uses: actions/checkout@v2 uses: actions/checkout@v2
- - name: "Install modules"
name: "Install modules"
working-directory: ./Resources/Private working-directory: ./Resources/Private
run: yarn run: yarn
- - name: "Run command"
name: "Run command"
working-directory: ./Resources/Private working-directory: ./Resources/Private
run: "yarn lint:${{ matrix.command }}" run: "yarn lint:${{ matrix.command }}"
xliff-lint: xliff-lint:
name: "Xliff linter" name: "Xliff linter"
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- - name: "Checkout"
name: "Checkout"
uses: actions/checkout@v2 uses: actions/checkout@v2
- - name: "Install xmllint"
name: "Install xmllint"
run: "sudo apt-get install libxml2-utils wget" run: "sudo apt-get install libxml2-utils wget"
- - name: "Download xliff schema"
name: "Download xliff schema"
run: "wget https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd" run: "wget https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd"
- - name: "Run lint"
name: "Run lint"
run: "xmllint --schema ./xliff-core-1.2-strict.xsd run: "xmllint --schema ./xliff-core-1.2-strict.xsd
--noout $(find Resources -name '*.xlf')" --noout $(find Resources -name '*.xlf')"
unit-tests: unit-tests:
@ -110,45 +98,38 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
needs: php-lint needs: php-lint
steps: steps:
- - name: "Checkout"
name: "Checkout"
uses: actions/checkout@v2 uses: actions/checkout@v2
- - name: "Install PHP"
name: "Install PHP"
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: "${{ matrix.php-version }}" php-version: "${{ matrix.php-version }}"
tools: composer:v2 tools: composer:v2
- name: "Show Composer version" - name: "Show Composer version"
run: composer --version run: composer --version
- - name: "Cache dependencies installed with composer"
name: "Cache dependencies installed with composer"
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.composer/cache path: ~/.composer/cache
restore-keys: "php${{ matrix.php-version }}-composer-\n" restore-keys: "php${{ matrix.php-version }}-composer-\n"
- - env:
env:
TYPO3: "${{ matrix.typo3-version }}" TYPO3: "${{ matrix.typo3-version }}"
name: "Install TYPO3 Core" name: "Install TYPO3 Core"
run: | run: |
composer require --no-progress typo3/minimal:"$TYPO3" composer require --no-progress typo3/minimal:"$TYPO3"
composer show composer show
- - if: "matrix.composer-dependencies == 'lowest'"
if: "matrix.composer-dependencies == 'lowest'"
name: "Install lowest dependencies with composer" name: "Install lowest dependencies with composer"
run: | run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
composer show composer show
- - if: "matrix.composer-dependencies == 'highest'"
if: "matrix.composer-dependencies == 'highest'"
name: "Install highest dependencies with composer" name: "Install highest dependencies with composer"
run: | run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies composer update --no-ansi --no-interaction --no-progress --with-dependencies
composer show composer show
- - name: "Run unit tests"
name: "Run unit tests"
run: "composer ci:tests:unit" run: "composer ci:tests:unit"
strategy: strategy:
matrix: matrix:
@ -167,11 +148,9 @@ jobs:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
needs: php-lint needs: php-lint
steps: steps:
- - name: "Checkout"
name: "Checkout"
uses: actions/checkout@v2 uses: actions/checkout@v2
- - name: "Install PHP"
name: "Install PHP"
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: "${{ matrix.php-version }}" php-version: "${{ matrix.php-version }}"
@ -179,37 +158,31 @@ jobs:
extensions: mysqli extensions: mysqli
- name: "Show Composer version" - name: "Show Composer version"
run: composer --version run: composer --version
- - name: "Cache dependencies installed with composer"
name: "Cache dependencies installed with composer"
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.composer/cache path: ~/.composer/cache
restore-keys: "php${{ matrix.php-version }}-composer-\n" restore-keys: "php${{ matrix.php-version }}-composer-\n"
- - env:
env:
TYPO3: "${{ matrix.typo3-version }}" TYPO3: "${{ matrix.typo3-version }}"
name: "Install TYPO3 Core" name: "Install TYPO3 Core"
run: | run: |
composer require --no-progress typo3/minimal:"$TYPO3" composer require --no-progress typo3/minimal:"$TYPO3"
composer show composer show
- - if: "matrix.composer-dependencies == 'lowest'"
if: "matrix.composer-dependencies == 'lowest'"
name: "Install lowest dependencies with composer" name: "Install lowest dependencies with composer"
run: | run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
composer show composer show
- - if: "matrix.composer-dependencies == 'highest'"
if: "matrix.composer-dependencies == 'highest'"
name: "Install highest dependencies with composer" name: "Install highest dependencies with composer"
run: | run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies composer update --no-ansi --no-interaction --no-progress --with-dependencies
composer show composer show
- - name: "Start MySQL"
name: "Start MySQL"
run: "sudo /etc/init.d/mysql start" run: "sudo /etc/init.d/mysql start"
- - name: "Run functional tests"
name: "Run functional tests"
run: | run: |
export typo3DatabaseName="typo3"; export typo3DatabaseName="typo3";
export typo3DatabaseHost="127.0.0.1"; export typo3DatabaseHost="127.0.0.1";

View file

@ -26,7 +26,7 @@ variables:
build-composer-dependencies: build-composer-dependencies:
extends: .default extends: .default
stage: build stage: build
needs: [] needs: [ ]
variables: variables:
COMPOSER_CACHE_DIR: '.composer' COMPOSER_CACHE_DIR: '.composer'
script: script:
@ -47,7 +47,7 @@ php-lint-php7.2:
extends: .default extends: .default
image: php:7.2 image: php:7.2
stage: lint stage: lint
needs: [] needs: [ ]
script: script:
- composer ci:php:lint - composer ci:php:lint
@ -55,7 +55,7 @@ php-lint-php7.3:
extends: .default extends: .default
image: php:7.3 image: php:7.3
stage: lint stage: lint
needs: [] needs: [ ]
script: script:
- composer ci:php:lint - composer ci:php:lint
@ -63,7 +63,7 @@ php-lint-php7.4:
extends: .default extends: .default
image: php:7.4 image: php:7.4
stage: lint stage: lint
needs: [] needs: [ ]
script: script:
- composer ci:php:lint - composer ci:php:lint
@ -177,7 +177,7 @@ unit-php7.2-v9:
extends: .default extends: .default
image: php:7.2 image: php:7.2
stage: test stage: test
dependencies: [] dependencies: [ ]
needs: needs:
- build-composer-dependencies - build-composer-dependencies
- php-lint-php7.2 - php-lint-php7.2
@ -189,7 +189,7 @@ unit-php7.3-v9:
extends: .default extends: .default
image: php:7.3 image: php:7.3
stage: test stage: test
dependencies: [] dependencies: [ ]
needs: needs:
- build-composer-dependencies - build-composer-dependencies
- php-lint-php7.3 - php-lint-php7.3
@ -201,7 +201,7 @@ unit-php7.4-v9:
extends: .default extends: .default
image: php:7.4 image: php:7.4
stage: test stage: test
dependencies: [] dependencies: [ ]
needs: needs:
- build-composer-dependencies - build-composer-dependencies
- php-lint-php7.4 - php-lint-php7.4
@ -215,7 +215,7 @@ func-php7.2-v9:
services: services:
- mariadb:10 - mariadb:10
stage: test stage: test
dependencies: [] dependencies: [ ]
needs: needs:
- build-composer-dependencies - build-composer-dependencies
- php-lint-php7.2 - php-lint-php7.2
@ -229,7 +229,7 @@ func-php7.3-v9:
services: services:
- mariadb:10 - mariadb:10
stage: test stage: test
dependencies: [] dependencies: [ ]
needs: needs:
- build-composer-dependencies - build-composer-dependencies
- php-lint-php7.3 - php-lint-php7.3
@ -243,7 +243,7 @@ func-php7.4-v9:
services: services:
- mariadb:10 - mariadb:10
stage: test stage: test
dependencies: [] dependencies: [ ]
needs: needs:
- build-composer-dependencies - build-composer-dependencies
- php-lint-php7.4 - php-lint-php7.4

View file

@ -3,4 +3,8 @@
defined('TYPO3_MODE') || die('Access denied.'); defined('TYPO3_MODE') || die('Access denied.');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('tea', 'Configuration/TypoScript', 'Tea'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('tea', 'Configuration/TypoScript', 'Tea');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('tea', 'Configuration/TypoScript/Frontend/', 'Tea frontend (optional)'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'tea',
'Configuration/TypoScript/Frontend/',
'Tea frontend (optional)'
);

View file

@ -1,24 +1,17 @@
--- ---
sniffs: sniffs:
- - class: Indentation
class: Indentation
parameters: parameters:
indentConditions: true indentConditions: true
indentPerLevel: 2 indentPerLevel: 2
useSpaces: true useSpaces: true
- - class: DeadCode
class: DeadCode - class: OperatorWhitespace
- - class: RepeatingRValue
class: OperatorWhitespace
-
class: RepeatingRValue
disabled: true disabled: true
- - class: DuplicateAssignment
class: DuplicateAssignment - class: EmptySection
-
class: EmptySection
disabled: true disabled: true
- - class: NestingConsistency
class: NestingConsistency
parameters: parameters:
commonPathPrefixThreshold: 1 commonPathPrefixThreshold: 1

View file

@ -1,10 +1,10 @@
{ {
"root": true, "root": true,
"extends": [ "extends": [
"eslint:recommended", "eslint:recommended",
"plugin:prettier/recommended" "plugin:prettier/recommended"
], ],
"env": { "env": {
"browser": true "browser": true
} }
} }

View file

@ -1,7 +1,7 @@
module.exports = { module.exports = {
semi: true, semi: true,
trailingComma: "all", trailingComma: "all",
singleQuote: true, singleQuote: true,
printWidth: 120, printWidth: 120,
tabWidth: 4 tabWidth: 4
}; };

View file

@ -1,36 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" target-language="de" datatype="plaintext" original="messages"> <file source-language="en" target-language="de" datatype="plaintext" original="messages">
<header/> <header/>
<body> <body>
<trans-unit id="plugin.tea"> <trans-unit id="plugin.tea">
<source>Tea</source> <source>Tea</source>
<target>Tee</target> <target>Tee</target>
</trans-unit> </trans-unit>
<trans-unit id="plugin.tea.view"> <trans-unit id="plugin.tea.view">
<source>View</source> <source>View</source>
<target>Ansicht</target> <target>Ansicht</target>
</trans-unit> </trans-unit>
<trans-unit id="plugin.tea.index"> <trans-unit id="plugin.tea.index">
<source>Tea list</source> <source>Tea list</source>
<target>Teeliste</target> <target>Teeliste</target>
</trans-unit> </trans-unit>
<trans-unit id="plugin.tea.show"> <trans-unit id="plugin.tea.show">
<source>Tea single view</source> <source>Tea single view</source>
<target>Tee-Einzelansicht</target> <target>Tee-Einzelansicht</target>
</trans-unit> </trans-unit>
<trans-unit id="index.heading"> <trans-unit id="index.heading">
<source>Our selection of assorted teas</source> <source>Our selection of assorted teas</source>
<target>Unsere Auswahl an erlesenen Tees</target> <target>Unsere Auswahl an erlesenen Tees</target>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.uid"> <trans-unit id="tx_tea_domain_model_product_tea.uid">
<source>UID</source> <source>UID</source>
<target>UID</target> <target>UID</target>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.title"> <trans-unit id="tx_tea_domain_model_product_tea.title">
<source>Title</source> <source>Title</source>
<target>Titel</target> <target>Titel</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" target-language="de" datatype="plaintext" original="messages"> <file source-language="en" target-language="de" datatype="plaintext" original="messages">
<header/> <header/>
<body> <body>
<trans-unit id="tx_tea_domain_model_product_tea"> <trans-unit id="tx_tea_domain_model_product_tea">
<source>Tea</source> <source>Tea</source>
<target>Tee</target> <target>Tee</target>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.title"> <trans-unit id="tx_tea_domain_model_product_tea.title">
<source>Title</source> <source>Title</source>
<target>Titel</target> <target>Titel</target>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.description"> <trans-unit id="tx_tea_domain_model_product_tea.description">
<source>Description</source> <source>Description</source>
<target>Beschreibung</target> <target>Beschreibung</target>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.image"> <trans-unit id="tx_tea_domain_model_product_tea.image">
<source>Image</source> <source>Image</source>
<target>Bild</target> <target>Bild</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" datatype="plaintext" original="messages"> <file source-language="en" datatype="plaintext" original="messages">
<header/> <header/>
<body> <body>
<trans-unit id="plugin.tea"> <trans-unit id="plugin.tea">
<source>Tea</source> <source>Tea</source>
</trans-unit> </trans-unit>
<trans-unit id="plugin.tea.view"> <trans-unit id="plugin.tea.view">
<source>View</source> <source>View</source>
</trans-unit> </trans-unit>
<trans-unit id="plugin.tea.index"> <trans-unit id="plugin.tea.index">
<source>Tea list</source> <source>Tea list</source>
</trans-unit> </trans-unit>
<trans-unit id="plugin.tea.show"> <trans-unit id="plugin.tea.show">
<source>Tea single view</source> <source>Tea single view</source>
</trans-unit> </trans-unit>
<trans-unit id="index.heading"> <trans-unit id="index.heading">
<source>Our selection of assorted teas</source> <source>Our selection of assorted teas</source>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.uid"> <trans-unit id="tx_tea_domain_model_product_tea.uid">
<source>UID</source> <source>UID</source>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.title"> <trans-unit id="tx_tea_domain_model_product_tea.title">
<source>Title</source> <source>Title</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" datatype="plaintext" original="messages"> <file source-language="en" datatype="plaintext" original="messages">
<header/> <header/>
<body> <body>
<trans-unit id="tx_tea_domain_model_product_tea"> <trans-unit id="tx_tea_domain_model_product_tea">
<source>Tea</source> <source>Tea</source>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.title"> <trans-unit id="tx_tea_domain_model_product_tea.title">
<source>Title</source> <source>Title</source>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.description"> <trans-unit id="tx_tea_domain_model_product_tea.description">
<source>Description</source> <source>Description</source>
</trans-unit> </trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.image"> <trans-unit id="tx_tea_domain_model_product_tea.image">
<source>Image</source> <source>Image</source>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View file

@ -10,8 +10,12 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th><f:translate key="tx_tea_domain_model_product_tea.uid"/></th> <th>
<th><f:translate key="tx_tea_domain_model_product_tea.title"/></th> <f:translate key="tx_tea_domain_model_product_tea.uid"/>
</th>
<th>
<f:translate key="tx_tea_domain_model_product_tea.title"/>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View file

@ -1,27 +1,27 @@
{ {
"name": "tea", "name": "tea",
"description": "", "description": "",
"repository": { "repository": {
"url": "https://github.com/TYPO3-Documentation/tea.git" "url": "https://github.com/TYPO3-Documentation/tea.git"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"scripts": { "scripts": {
"lint:js": "eslint --config .eslintrc.json '../Public/**/*.js'", "lint:js": "eslint --config .eslintrc.json '../Public/**/*.js'",
"lint:js:fix": "eslint --config .eslintrc.json '../Public/**/*.js' --quiet --fix", "lint:js:fix": "eslint --config .eslintrc.json '../Public/**/*.js' --quiet --fix",
"lint:style": "stylelint --config stylelint.config.js ../Public/**/*.css", "lint:style": "stylelint --config stylelint.config.js ../Public/**/*.css",
"lint:style:fix": "stylelint --config stylelint.config.js ../Public/**/*.css --fix" "lint:style:fix": "stylelint --config stylelint.config.js ../Public/**/*.css --fix"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0", "eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.20.1", "eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^3.1.4", "eslint-plugin-prettier": "^3.1.4",
"prettier": "^2.0.5", "prettier": "^2.0.5",
"stylelint": "^13", "stylelint": "^13",
"stylelint-config-recommended": "^3.0.0", "stylelint-config-recommended": "^3.0.0",
"stylelint-no-browser-hacks": "^1.2.1" "stylelint-no-browser-hacks": "^1.2.1"
} }
} }

View file

@ -1,169 +1,169 @@
"use strict"; "use strict";
module.exports = { module.exports = {
extends: "stylelint-config-recommended", extends: "stylelint-config-recommended",
rules: { rules: {
"at-rule-empty-line-before": [ "at-rule-empty-line-before": [
"always", "always",
{ {
"except": [ "except": [
"blockless-after-same-name-blockless", "blockless-after-same-name-blockless",
"first-nested" "first-nested"
],
"ignore": [
"after-comment"
]
}
], ],
"at-rule-name-case": "lower", "ignore": [
"at-rule-name-space-after": "always-single-line", "after-comment"
"at-rule-semicolon-newline-after": "always", ]
"block-closing-brace-empty-line-before": "never", }
"block-closing-brace-newline-after": "always", ],
"block-closing-brace-newline-before": "always-multi-line", "at-rule-name-case": "lower",
"block-closing-brace-space-before": "always-single-line", "at-rule-name-space-after": "always-single-line",
"block-no-empty": true, "at-rule-semicolon-newline-after": "always",
"block-opening-brace-newline-after": "always-multi-line", "block-closing-brace-empty-line-before": "never",
"block-opening-brace-space-after": "always-single-line", "block-closing-brace-newline-after": "always",
"block-opening-brace-space-before": "always", "block-closing-brace-newline-before": "always-multi-line",
"color-hex-case": "lower", "block-closing-brace-space-before": "always-single-line",
"color-hex-length": "short", "block-no-empty": true,
"color-no-invalid-hex": true, "block-opening-brace-newline-after": "always-multi-line",
"comment-empty-line-before": [ "block-opening-brace-space-after": "always-single-line",
"always", "block-opening-brace-space-before": "always",
{ "color-hex-case": "lower",
"except": [ "color-hex-length": "short",
"first-nested" "color-no-invalid-hex": true,
], "comment-empty-line-before": [
"ignore": [ "always",
"stylelint-commands" {
] "except": [
} "first-nested"
], ],
"comment-no-empty": true, "ignore": [
"comment-whitespace-inside": "always", "stylelint-commands"
"custom-property-empty-line-before": [ ]
"always", }
{ ],
"except": [ "comment-no-empty": true,
"after-custom-property", "comment-whitespace-inside": "always",
"first-nested" "custom-property-empty-line-before": [
], "always",
"ignore": [ {
"after-comment", "except": [
"inside-single-line-block" "after-custom-property",
] "first-nested"
}
], ],
"declaration-bang-space-after": "never", "ignore": [
"declaration-bang-space-before": "always", "after-comment",
"declaration-block-no-duplicate-properties": [ "inside-single-line-block"
true, ]
{ }
"ignore": [ ],
"consecutive-duplicates-with-different-values" "declaration-bang-space-after": "never",
] "declaration-bang-space-before": "always",
} "declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
}
],
"declaration-block-no-redundant-longhand-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-empty-line-before": [
"always",
{
"except": [
"after-declaration",
"first-nested"
], ],
"declaration-block-no-redundant-longhand-properties": true, "ignore": [
"declaration-block-no-shorthand-property-overrides": true, "after-comment",
"declaration-block-semicolon-newline-after": "always-multi-line", "inside-single-line-block"
"declaration-block-semicolon-space-after": "always-single-line", ]
"declaration-block-semicolon-space-before": "never", }
"declaration-block-single-line-max-declarations": 1, ],
"declaration-block-trailing-semicolon": "always", "font-family-no-duplicate-names": true,
"declaration-colon-newline-after": "always-multi-line", "function-calc-no-unspaced-operator": true,
"declaration-colon-space-after": "always-single-line", "function-comma-newline-after": "always-multi-line",
"declaration-colon-space-before": "never", "function-comma-space-after": "always-single-line",
"declaration-empty-line-before": [ "function-comma-space-before": "never",
"always", "function-linear-gradient-no-nonstandard-direction": true,
{ "function-max-empty-lines": 0,
"except": [ "function-name-case": "lower",
"after-declaration", "function-parentheses-newline-inside": "always-multi-line",
"first-nested" "function-parentheses-space-inside": "never-single-line",
], "function-whitespace-after": "always",
"ignore": [ "indentation": 4,
"after-comment", "keyframe-declaration-no-important": true,
"inside-single-line-block" "length-zero-no-unit": true,
] "max-empty-lines": 1,
} "media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-case": "lower",
"media-feature-name-no-unknown": true,
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"no-missing-end-of-source-newline": true,
"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"property-case": "lower",
"property-no-unknown": [
true,
{
"ignoreProperties": [
"/^scroll-padding/"
]
}
],
"rule-empty-line-before": [
"always-multi-line",
{
"except": [
"first-nested"
], ],
"font-family-no-duplicate-names": true, "ignore": [
"function-calc-no-unspaced-operator": true, "after-comment"
"function-comma-newline-after": "always-multi-line", ]
"function-comma-space-after": "always-single-line", }
"function-comma-space-before": "never", ],
"function-linear-gradient-no-nonstandard-direction": true, "selector-attribute-brackets-space-inside": "never",
"function-max-empty-lines": 0, "selector-attribute-operator-space-after": "never",
"function-name-case": "lower", "selector-attribute-operator-space-before": "never",
"function-parentheses-newline-inside": "always-multi-line", "selector-combinator-space-after": "always",
"function-parentheses-space-inside": "never-single-line", "selector-combinator-space-before": "always",
"function-whitespace-after": "always", "selector-descendant-combinator-no-non-space": true,
"indentation": 4, "selector-list-comma-newline-after": "always",
"keyframe-declaration-no-important": true, "selector-list-comma-space-before": "never",
"length-zero-no-unit": true, "selector-max-empty-lines": 0,
"max-empty-lines": 1, "selector-pseudo-class-case": "lower",
"media-feature-colon-space-after": "always", "selector-pseudo-class-no-unknown": true,
"media-feature-colon-space-before": "never", "selector-pseudo-class-parentheses-space-inside": "never",
"media-feature-name-case": "lower", "selector-pseudo-element-case": "lower",
"media-feature-name-no-unknown": true, "selector-pseudo-element-colon-notation": "single",
"media-feature-parentheses-space-inside": "never", "selector-pseudo-element-no-unknown": true,
"media-feature-range-operator-space-after": "always", "selector-type-case": "lower",
"media-feature-range-operator-space-before": "always", "selector-type-no-unknown": true,
"media-query-list-comma-newline-after": "always-multi-line", "shorthand-property-no-redundant-values": true,
"media-query-list-comma-space-after": "always-single-line", "string-no-newline": true,
"media-query-list-comma-space-before": "never", "unit-case": "lower",
"no-empty-source": true, "unit-no-unknown": true,
"no-eol-whitespace": true, "value-list-comma-newline-after": "always-multi-line",
"no-extra-semicolons": true, "value-list-comma-space-after": "always-single-line",
"no-invalid-double-slash-comments": true, "value-list-comma-space-before": "never",
"no-missing-end-of-source-newline": true, "value-list-max-empty-lines": 0,
"number-leading-zero": "always", },
"number-no-trailing-zeros": true,
"property-case": "lower",
"property-no-unknown": [
true,
{
"ignoreProperties": [
"/^scroll-padding/"
]
}
],
"rule-empty-line-before": [
"always-multi-line",
{
"except": [
"first-nested"
],
"ignore": [
"after-comment"
]
}
],
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-descendant-combinator-no-non-space": true,
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"selector-max-empty-lines": 0,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "single",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"shorthand-property-no-redundant-values": true,
"string-no-newline": true,
"unit-case": "lower",
"unit-no-unknown": true,
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
"value-list-max-empty-lines": 0,
},
}; };

View file

@ -4,8 +4,7 @@ suites:
actor: AcceptanceTester actor: AcceptanceTester
modules: modules:
enabled: enabled:
- - WebDriver:
WebDriver:
browser: chrome browser: chrome
url: "https://www.oliverklee.de" url: "https://www.oliverklee.de"
- \Helper\Acceptance - \Helper\Acceptance
@ -13,7 +12,7 @@ suites:
extensions: extensions:
enabled: enabled:
- Codeception\Extension\RunFailed - Codeception\Extension\RunFailed
gherkin: [] gherkin: [ ]
modules: modules:
config: config:
WebDriver: WebDriver:

View file

@ -1,124 +1,124 @@
{ {
"name": "ttn/tea", "name": "ttn/tea",
"description": "TYPO3 example extension for unit testing and best practices", "description": "TYPO3 example extension for unit testing and best practices",
"type": "typo3-cms-extension", "type": "typo3-cms-extension",
"keywords": [ "keywords": [
"typo3", "typo3",
"example", "example",
"extension", "extension",
"tdd", "tdd",
"phpunit", "phpunit",
"unit testing", "unit testing",
"best practices" "best practices"
], ],
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"authors": [ "authors": [
{ {
"name": "Oliver Klee", "name": "Oliver Klee",
"email": "typo3-coding@oliverklee.de", "email": "typo3-coding@oliverklee.de",
"homepage": "https://www.oliverklee.de", "homepage": "https://www.oliverklee.de",
"role": "developer" "role": "developer"
} }
], ],
"support": { "support": {
"issues": "https://github.com/typo3-trainer-network/tea/issues", "issues": "https://github.com/typo3-trainer-network/tea/issues",
"source": "https://github.com/typo3-trainer-network/tea" "source": "https://github.com/typo3-trainer-network/tea"
}, },
"require": { "require": {
"php": "~7.2.0 || ~7.3.0 || ~7.4.0", "php": "~7.2.0 || ~7.3.0 || ~7.4.0",
"typo3/cms-core": "^9.5 || ^10.4", "typo3/cms-core": "^9.5 || ^10.4",
"typo3/cms-extbase": "^9.5 || ^10.4", "typo3/cms-extbase": "^9.5 || ^10.4",
"typo3/cms-fluid": "^9.5 || ^10.4", "typo3/cms-fluid": "^9.5 || ^10.4",
"typo3/cms-frontend": "^9.5 || ^10.4" "typo3/cms-frontend": "^9.5 || ^10.4"
}, },
"require-dev": { "require-dev": {
"codeception/codeception": "^4.1.5", "codeception/codeception": "^4.1.5",
"friendsofphp/php-cs-fixer": "^2.16.3", "friendsofphp/php-cs-fixer": "^2.16.3",
"helhum/typo3-composer-setup": "^0.5.7", "helhum/typo3-composer-setup": "^0.5.7",
"helmich/typo3-typoscript-lint": "^2.1.1", "helmich/typo3-typoscript-lint": "^2.1.1",
"nimut/testing-framework": "^5.0.3", "nimut/testing-framework": "^5.0.3",
"phpunit/phpunit": "^7.5.20", "phpunit/phpunit": "^7.5.20",
"squizlabs/php_codesniffer": "^3.5.5", "squizlabs/php_codesniffer": "^3.5.5",
"typo3/cms-fluid-styled-content": "^9.5 || ^10.4", "typo3/cms-fluid-styled-content": "^9.5 || ^10.4",
"seld/jsonlint": "^1.8", "seld/jsonlint": "^1.8",
"phpdocumentor/reflection-docblock": "<= 5.1 || > 5.2", "phpdocumentor/reflection-docblock": "<= 5.1 || > 5.2",
"j13k/yaml-lint": "1.1.x-dev", "j13k/yaml-lint": "1.1.x-dev",
"sebastian/phpcpd": "^4.1.0" "sebastian/phpcpd": "^4.1.0"
}, },
"conflict": { "conflict": {
"typo3/class-alias-loader": "< 1.1.0" "typo3/class-alias-loader": "< 1.1.0"
}, },
"replace": { "replace": {
"typo3-ter/tea": "self.version" "typo3-ter/tea": "self.version"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"TTN\\Tea\\": "Classes/" "TTN\\Tea\\": "Classes/"
} }
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
"TTN\\Tea\\Tests\\": "Tests/" "TTN\\Tea\\Tests\\": "Tests/"
} }
}, },
"prefer-stable": true, "prefer-stable": true,
"config": { "config": {
"preferred-install": { "preferred-install": {
"*": "dist" "*": "dist"
}, },
"sort-packages": true, "sort-packages": true,
"vendor-dir": ".Build/vendor" "vendor-dir": ".Build/vendor"
}, },
"scripts": { "scripts": {
"ci:php:lint": "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l", "ci:php:lint": "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l",
"ci:php:codestyle": "php-cs-fixer fix --config .php_cs.php -v --dry-run --using-cache false --diff --diff-format=udiff", "ci:php:codestyle": "php-cs-fixer fix --config .php_cs.php -v --dry-run --using-cache false --diff --diff-format=udiff",
"ci:php:sniff": ".Build/vendor/bin/phpcs Classes Configuration Tests", "ci:php:sniff": ".Build/vendor/bin/phpcs Classes Configuration Tests",
"ci:php:copypaste": ".Build/vendor/bin/phpcpd Classes Configuration Tests", "ci:php:copypaste": ".Build/vendor/bin/phpcpd Classes Configuration Tests",
"ci:json:lint": "find . ! -path '*.Build/*' -name '*.json' | xargs .Build/vendor/bin/jsonlint -q", "ci:json:lint": "find . ! -path '*.Build/*' -name '*.json' | xargs .Build/vendor/bin/jsonlint -q",
"ci:yaml:lint": "find . ! -path '*.Build/*' -name '*.yml' | xargs .Build/vendor/bin/yaml-lint", "ci:yaml:lint": "find . ! -path '*.Build/*' -name '*.yml' | xargs .Build/vendor/bin/yaml-lint",
"ci:ts:lint": ".Build/vendor/bin/typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript", "ci:ts:lint": ".Build/vendor/bin/typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
"ci:tests:unit": ".Build/vendor/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml Tests/Unit", "ci:tests:unit": ".Build/vendor/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml Tests/Unit",
"ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/vendor/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml {}';", "ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/vendor/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml {}';",
"ci:tests": [ "ci:tests": [
"@ci:tests:unit", "@ci:tests:unit",
"@ci:tests:functional" "@ci:tests:functional"
], ],
"ci:dynamic": [ "ci:dynamic": [
"@ci:tests" "@ci:tests"
], ],
"ci:php": [ "ci:php": [
"@ci:php:codestyle", "@ci:php:codestyle",
"@ci:php:sniff" "@ci:php:sniff"
], ],
"ci:static": [ "ci:static": [
"@ci:php:lint", "@ci:php:lint",
"@ci:php:sniff", "@ci:php:sniff",
"@ci:ts:lint" "@ci:ts:lint"
], ],
"ci": [ "ci": [
"@ci:static" "@ci:static"
], ],
"link-extension": [ "link-extension": [
"@php -r 'is_dir($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/\") || mkdir($extFolder, 0777, true);'", "@php -r 'is_dir($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/\") || mkdir($extFolder, 0777, true);'",
"@php -r 'file_exists($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/tea\") || symlink(__DIR__,$extFolder);'" "@php -r 'file_exists($extFolder=__DIR__.\"/.Build/public/typo3conf/ext/tea\") || symlink(__DIR__,$extFolder);'"
], ],
"fix:php:cs": "php-cs-fixer fix --config .php_cs.php", "fix:php:cs": "php-cs-fixer fix --config .php_cs.php",
"fix:php:sniff": ".Build/vendor/bin/phpcs Classes Configuration Tests", "fix:php:sniff": ".Build/vendor/bin/phpcs Classes Configuration Tests",
"fix:php": [ "fix:php": [
"@fix:php:cs", "@fix:php:cs",
"@fix:php:sniff" "@fix:php:sniff"
], ],
"post-autoload-dump": [ "post-autoload-dump": [
"@link-extension" "@link-extension"
] ]
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "2.0.x-dev" "dev-main": "2.0.x-dev"
}, },
"typo3/cms": { "typo3/cms": {
"extension-key": "tea", "extension-key": "tea",
"web-dir": ".Build/public" "web-dir": ".Build/public"
} }
} }
} }

View file

@ -1,5 +1,5 @@
CREATE TABLE tx_tea_domain_model_product_tea ( CREATE TABLE tx_tea_domain_model_product_tea (
title varchar(255) DEFAULT '' NOT NULL, title varchar(255) DEFAULT '' NOT NULL,
description varchar(2000) DEFAULT '' NOT NULL, description varchar(2000) DEFAULT '' NOT NULL,
image int(11) unsigned DEFAULT '0' NOT NULL image int(11) unsigned DEFAULT '0' NOT NULL
); );