From 19d737a7e7f16baadeaa55855756af2ed24bbdc9 Mon Sep 17 00:00:00 2001 From: Damiano Improta Date: Tue, 7 Oct 2025 23:19:27 +0200 Subject: [PATCH 1/4] do fail one test --- tests/CacheManagerDryRunTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CacheManagerDryRunTest.php b/tests/CacheManagerDryRunTest.php index 8731774..b757da2 100644 --- a/tests/CacheManagerDryRunTest.php +++ b/tests/CacheManagerDryRunTest.php @@ -30,7 +30,7 @@ public function testInteger(): void $key = 'test_integer'; $res = $this->getCacheManager()->set($key, $x); $this->assertTrue($res); - $val = $this->getCacheManager()->get($key); + $val = 5;//$this->getCacheManager()->get($key); $this->assertNull($val); } From b87fe2976c549c6f13898dabb495674fc12f42f6 Mon Sep 17 00:00:00 2001 From: Damiano Improta Date: Tue, 7 Oct 2025 23:25:07 +0200 Subject: [PATCH 2/4] revert test --- tests/CacheManagerDryRunTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CacheManagerDryRunTest.php b/tests/CacheManagerDryRunTest.php index b757da2..8731774 100644 --- a/tests/CacheManagerDryRunTest.php +++ b/tests/CacheManagerDryRunTest.php @@ -30,7 +30,7 @@ public function testInteger(): void $key = 'test_integer'; $res = $this->getCacheManager()->set($key, $x); $this->assertTrue($res); - $val = 5;//$this->getCacheManager()->get($key); + $val = $this->getCacheManager()->get($key); $this->assertNull($val); } From 105593b198750426343ffc1a7f8136f32dfaf6cb Mon Sep 17 00:00:00 2001 From: Damiano Improta Date: Tue, 7 Oct 2025 23:31:32 +0200 Subject: [PATCH 3/4] ripristinato format code --- .github/workflows/format-code.yml | 91 +++++++++++++++---------------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/.github/workflows/format-code.yml b/.github/workflows/format-code.yml index dab929f..d73f074 100644 --- a/.github/workflows/format-code.yml +++ b/.github/workflows/format-code.yml @@ -1,47 +1,46 @@ -#name: Run format-code +name: Run format-code -# -#on: -# pull_request: -# types: [opened, synchronize, reopened] -# -#permissions: -# contents: write -# -#jobs: -# build: -# -# runs-on: ubuntu-latest -# -# steps: -# - uses: actions/checkout@v4 -# -# - name: Validate composer.json and composer.lock -# run: composer validate -# -# - name: Cache Composer packages -# id: composer-cache -# uses: actions/cache@v3 -# with: -# path: ./app/vendor -# key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} -# restore-keys: | -# ${{ runner.os }}-php- -# -# - name: Install dependencies -# run: composer install --prefer-dist --no-progress -# -# - name: format code -# run: bash commands php-cs-fixer -# - name: Check for changes -# run: | -# git config user.name "github-actions[bot]" -# git config user.email "41898282+github-actions[bot]@users.noreply.github.com" -# if [ -n "$(git status --porcelain)" ]; then -# echo "Formatting changes detected" -# git add -A -# git commit -m "chore: apply formatting" || echo "no commit" -# git push origin HEAD:${{ github.head_ref }} -# else -# echo "No formatting changes" -# fi \ No newline at end of file +on: + pull_request: + branches: + - main + types: [opened, synchronize, reopened] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: ./vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: format code + run: bash commands php-cs-fixer + - name: Commit and Push changes + run: | + if [ -z "$(git status --porcelain)" ]; then + echo "✅ No changes to commit." + else + echo "Found changes, committing..." + git config --global user.name "GitHub Actions Bot" + git config --global user.email "github-actions-bot@users.noreply.github.com" + git add . + git commit -m "style: Fix PHP code style issues" + git push + fi \ No newline at end of file From 2483a4cbcee2cd810937f85f5243dcec880976c4 Mon Sep 17 00:00:00 2001 From: Damiano Improta Date: Tue, 7 Oct 2025 23:31:58 +0200 Subject: [PATCH 4/4] ripristinato format code --- .github/workflows/format-code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/format-code.yml b/.github/workflows/format-code.yml index d73f074..4e34b1f 100644 --- a/.github/workflows/format-code.yml +++ b/.github/workflows/format-code.yml @@ -35,7 +35,7 @@ jobs: - name: Commit and Push changes run: | if [ -z "$(git status --porcelain)" ]; then - echo "✅ No changes to commit." + echo "No changes to commit." else echo "Found changes, committing..." git config --global user.name "GitHub Actions Bot"