From 9993d760d638247795f941f4c4ac7082d2708acb Mon Sep 17 00:00:00 2001 From: lubiana Date: Sat, 4 May 2024 19:41:48 +0200 Subject: [PATCH 1/3] add ClassAttributeSeparationFixer --- config/ecs.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/ecs.php b/config/ecs.php index 28b4812..b5a07ba 100644 --- a/config/ecs.php +++ b/config/ecs.php @@ -77,6 +77,11 @@ return ECSConfig::configure() ] ) ->withConfiguredRule( + \PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer::class, + [ + 'elements' => ['const' => 'none', 'method' => 'one', 'property' => 'none', 'trait_import' => 'none', 'case' => 'none'], + ], + )->withConfiguredRule( DeclareStrictTypesSniff::class, [ 'declareOnFirstLine' => true, From 00f72e3be9bc9afc20bea2b51fa02a3209f31d44 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Sat, 4 May 2024 17:42:09 +0000 Subject: [PATCH 2/3] Continuous Integration Fixes --- config/ecs.php | 11 +++++++++-- src/LubiSetList.php | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/ecs.php b/config/ecs.php index b5a07ba..a964b49 100644 --- a/config/ecs.php +++ b/config/ecs.php @@ -1,5 +1,6 @@ withConfiguredRule( - \PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer::class, + ClassAttributesSeparationFixer::class, [ - 'elements' => ['const' => 'none', 'method' => 'one', 'property' => 'none', 'trait_import' => 'none', 'case' => 'none'], + 'elements' => [ + 'const' => 'none', + 'method' => 'one', + 'property' => 'none', + 'trait_import' => 'none', + 'case' => 'none', + ], ], )->withConfiguredRule( DeclareStrictTypesSniff::class, diff --git a/src/LubiSetList.php b/src/LubiSetList.php index 87017c2..092d20f 100644 --- a/src/LubiSetList.php +++ b/src/LubiSetList.php @@ -5,6 +5,5 @@ namespace Lubiana\CodeQuality; final class LubiSetList { public const string RECTOR = __DIR__ . '/../config/rector.php'; - public const string ECS = __DIR__ . '/../config/ecs.php'; } From e7ecf55e0490442efd8e453d7e4ead368e99ba7b Mon Sep 17 00:00:00 2001 From: lubiana Date: Sat, 4 May 2024 20:24:31 +0200 Subject: [PATCH 3/3] ci-fix --- .forgejo/workflows/push.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/push.yml b/.forgejo/workflows/push.yml index 0754eff..0f5e4de 100644 --- a/.forgejo/workflows/push.yml +++ b/.forgejo/workflows/push.yml @@ -10,15 +10,16 @@ jobs: REPO: '${{ github.repository }}' TOKEN: '${{ secrets.GITHUB_TOKEN }}' GIT_SERVER: 'git.php.fail' - COMPOSER_CACHE_DIR: /opt/hostedtoolcache/.composer/cache/files run: | git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git . git fetch git checkout ${{ github.head_ref }} - - name: create composer cache dir + - name: composer install + env: + COMPOSER_CACHE_DIR: /opt/hostedtoolcache/.composer/cache/files run: | - mkdir -p /opt/hostedtoolcache/.composer/cache/files - - run: composer install + mkdir -p ${{ env.COMPOSER_CACHE_DIR }} + composer install - run: composer lint - name: GIT commit and push all changed files env: