From 99f2bf9568df1d7c16e43d7f4284b3dfeb7088e2 Mon Sep 17 00:00:00 2001 From: Simon Gilli <25326036+gilbertsoft@users.noreply.github.com> Date: Sun, 18 Jul 2021 19:09:17 +0200 Subject: [PATCH] [FEATURE] Provide setup binary through composer --- README.md | 25 +++++++++++++++---------- composer.json | 3 ++- setup.php => typo3-coding-standards | 0 3 files changed, 17 insertions(+), 11 deletions(-) rename setup.php => typo3-coding-standards (100%) mode change 100644 => 100755 diff --git a/README.md b/README.md index 1b56de1..4a479d5 100644 --- a/README.md +++ b/README.md @@ -36,16 +36,21 @@ it is VS-Code, vim or PhpStorm. Our coding standards file can set this up for you. Run ```bash -php vendor/typo3/coding-standards/setup.php project -php vendor/typo3/coding-standards/setup.php extension +composer exec typo3-coding-standards project +``` + +or + +```bash +composer exec typo3-coding-standards extension ``` or if you want to update the rules, add `-f` option to the end. Have a look at the newly created files in your root folder: -- .php-cs-fixer.php -- .editorconfig +* .php-cs-fixer.php +* .editorconfig For projects, the folder `src/extensions` is configured by default, but you can accommodate where your extensions or PHP code resides in. For extensions, @@ -84,12 +89,12 @@ these guidelines. However, there are some more rules that we think are good: -- Remove leading slashes in use clauses. -- PHP single-line arrays should not have trailing comma. -- Single-line whitespace before closing semicolon are prohibited. -- Remove unused use statements in the PHP source code -- Ensure Concatenation to have at least one whitespace around -- Remove trailing whitespace at the end of blank lines. +* Remove leading slashes in use clauses. +* PHP single-line arrays should not have trailing comma. +* Single-line whitespace before closing semicolon are prohibited. +* Remove unused use statements in the PHP source code +* Ensure Concatenation to have at least one whitespace around +* Remove trailing whitespace at the end of blank lines. ## Maintaining and Development of this package diff --git a/composer.json b/composer.json index ccb025c..3a8840b 100644 --- a/composer.json +++ b/composer.json @@ -20,5 +20,6 @@ "psr-4": { "TYPO3\\CodingStandards\\": "src/" } - } + }, + "bin": "typo3-coding-standards" } diff --git a/setup.php b/typo3-coding-standards old mode 100644 new mode 100755 similarity index 100% rename from setup.php rename to typo3-coding-standards