From 2ab394efbaa33b7fc3125b56ecd24236354c8cb0 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 20:27:55 +0200 Subject: [PATCH 01/14] php-cs-fixer: use multiple processors --- .github/workflows/code-style.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 591923edad..7dde7c968d 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer fix --diff + run: vendor/bin/php-cs-fixer list-files | xargs -P 3 vendor/bin/php-cs-fixer fix --diff - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 @@ -50,7 +50,7 @@ jobs: commit_user_email: rex-bot@users.noreply.github.com - name: Check code style - run: vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left + run: vendor/bin/php-cs-fixer list-files | xargs -P 3 vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left rector: runs-on: ubuntu-latest From 97a56c6834ed12c98d8ae58f8057de8a1a49ee6f Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 20:32:53 +0200 Subject: [PATCH 02/14] Update code-style.yml --- .github/workflows/code-style.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 7dde7c968d..885acf40a9 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files | xargs -P 3 vendor/bin/php-cs-fixer fix --diff + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -P 3 vendor/bin/php-cs-fixer fix --diff - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 @@ -50,7 +50,7 @@ jobs: commit_user_email: rex-bot@users.noreply.github.com - name: Check code style - run: vendor/bin/php-cs-fixer list-files | xargs -P 3 vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -P 3 vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left rector: runs-on: ubuntu-latest From 67a129897f8ecb1db533d1a289e427136edaef37 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 20:35:06 +0200 Subject: [PATCH 03/14] Update code-style.yml --- .github/workflows/code-style.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 885acf40a9..dd19de1f8c 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -P 3 vendor/bin/php-cs-fixer fix --diff + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 @@ -50,7 +50,7 @@ jobs: commit_user_email: rex-bot@users.noreply.github.com - name: Check code style - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -P 3 vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -P 3 vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle --config=.php-cs-fixer.dist.php | cs2pr # check whether there are still errors left rector: runs-on: ubuntu-latest From 8f719c237eead8080570811e751f3bbe1d9aca16 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 20:39:55 +0200 Subject: [PATCH 04/14] Update code-style.yml --- .github/workflows/code-style.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index dd19de1f8c..8ef6bc8c60 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 30 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 @@ -50,7 +50,7 @@ jobs: commit_user_email: rex-bot@users.noreply.github.com - name: Check code style - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -P 3 vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle --config=.php-cs-fixer.dist.php | cs2pr # check whether there are still errors left + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 30 -P 3 vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle --config=.php-cs-fixer.dist.php | cs2pr # check whether there are still errors left rector: runs-on: ubuntu-latest From bc8b994e8d95006ce00a9d30e5a3257196e28b77 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 20:44:49 +0200 Subject: [PATCH 05/14] Update code-style.yml --- .github/workflows/code-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 8ef6bc8c60..e5ec05757c 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -50,7 +50,7 @@ jobs: commit_user_email: rex-bot@users.noreply.github.com - name: Check code style - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 30 -P 3 vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle --config=.php-cs-fixer.dist.php | cs2pr # check whether there are still errors left + run: vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left rector: runs-on: ubuntu-latest From 382115b81ef4b40a318a86f00f692d865686a6d2 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 20:50:15 +0200 Subject: [PATCH 06/14] Update code-style.yml --- .github/workflows/code-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index e5ec05757c..f6db3218b9 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 30 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 50 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 From 392ba5da3a2f485443dfc33eef30312c6db2f3b9 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 20:51:43 +0200 Subject: [PATCH 07/14] Update code-style.yml --- .github/workflows/code-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index f6db3218b9..e5ec05757c 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 50 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 30 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 From b2b771fb978efaa4b9b97ac608ffb03f8c59d8b9 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 21:11:47 +0200 Subject: [PATCH 08/14] Update code-style.yml --- .github/workflows/code-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index e5ec05757c..c12d588f4a 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 30 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 50 -P 4 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 From cbf1adf35154ab11d14f49138385d7cc2efe7813 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 21:13:06 +0200 Subject: [PATCH 09/14] Update code-style.yml --- .github/workflows/code-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index c12d588f4a..f6db3218b9 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 50 -P 4 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 50 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 From cade22973f45fe30d5565062c5435dd64b0c22e5 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 11 May 2021 21:16:27 +0200 Subject: [PATCH 10/14] Update code-style.yml --- .github/workflows/code-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index f6db3218b9..334fc8a6fe 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 50 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 150 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 From a1f952ddd944db7e55ce98cc41204d4d2aa1b124 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 12 May 2021 19:54:33 +0200 Subject: [PATCH 11/14] Update code-style.yml --- .github/workflows/code-style.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 334fc8a6fe..0e5fa61a1f 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -50,6 +50,7 @@ jobs: commit_user_email: rex-bot@users.noreply.github.com - name: Check code style + if: env.writable == 0 run: vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left rector: From 300107802ca22e021d30d0c6af0cd9b6cd471d08 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 12 May 2021 20:12:01 +0200 Subject: [PATCH 12/14] Update code-style.yml --- .github/workflows/code-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 0e5fa61a1f..7149d56322 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -39,7 +39,7 @@ jobs: - name: Fix code style if: env.writable == 1 - run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 150 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php + run: vendor/bin/php-cs-fixer list-files --config=.php-cs-fixer.dist.php | xargs -n 250 -P 3 vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php - name: Commit changed files uses: stefanzweifel/git-auto-commit-action@v4 From 43808c43b021bd0aa9b581caa6cc3dc35eadd8c2 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 13 May 2021 15:36:45 +0200 Subject: [PATCH 13/14] Kill CS --- redaxo/src/core/lib/csrf_token.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/redaxo/src/core/lib/csrf_token.php b/redaxo/src/core/lib/csrf_token.php index 003489d999..a3bbbb59f3 100644 --- a/redaxo/src/core/lib/csrf_token.php +++ b/redaxo/src/core/lib/csrf_token.php @@ -7,8 +7,7 @@ * * @package redaxo\core */ -class rex_csrf_token -{ +class rex_csrf_token{ use rex_factory_trait; public const PARAM = '_csrf_token'; From 8ebf26f717cad3c46647e3932d805759e0350ffe Mon Sep 17 00:00:00 2001 From: staabm Date: Thu, 13 May 2021 13:37:34 +0000 Subject: [PATCH 14/14] Apply php-cs-fixer changes --- redaxo/src/core/lib/csrf_token.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redaxo/src/core/lib/csrf_token.php b/redaxo/src/core/lib/csrf_token.php index a3bbbb59f3..003489d999 100644 --- a/redaxo/src/core/lib/csrf_token.php +++ b/redaxo/src/core/lib/csrf_token.php @@ -7,7 +7,8 @@ * * @package redaxo\core */ -class rex_csrf_token{ +class rex_csrf_token +{ use rex_factory_trait; public const PARAM = '_csrf_token';