From 0a69e9a5145af0ef0177d657f526717f9290529a Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Thu, 7 May 2026 09:42:06 -0300 Subject: [PATCH 1/6] Add mago as composer dependency --- .github/workflows/mago.yml | 9 ++------- composer.json | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/mago.yml b/.github/workflows/mago.yml index 156be9bea1..d060c2c3d4 100644 --- a/.github/workflows/mago.yml +++ b/.github/workflows/mago.yml @@ -14,13 +14,8 @@ jobs: - name: Install dependencies run: composer install --dev --prefer-dist --no-progress - - name: "⚡ Install Mago" - run: | - mkdir -p bin - curl --proto '=https' --tlsv1.2 -sSf https://carthage.software/mago.sh | bash -s -- --install-dir=bin --no-verify - - name: "✅ Mago Lint" - run: ./bin/mago lint + run: vendor/bin/mago lint - name: "🔎 Mago Analyze" - run: ./bin/mago analyze + run: vendor/bin/mago analyze diff --git a/composer.json b/composer.json index afe67d4359..0f43b8bf72 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,8 @@ "friendsofphp/php-cs-fixer": "^3.54", "rector/rector": "^2.3.4", "phpstan/phpstan-strict-rules": "^2.0", - "kubawerlos/php-cs-fixer-custom-fixers": "^3.36" + "kubawerlos/php-cs-fixer-custom-fixers": "^3.36", + "carthage-software/mago": "^1.26" }, "config": { "allow-plugins": { From 2d1382eb199b741d9d57146419a57863e078033f Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Thu, 7 May 2026 09:43:45 -0300 Subject: [PATCH 2/6] Define php version --- .github/workflows/mago.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/mago.yml b/.github/workflows/mago.yml index d060c2c3d4..4ff73b9054 100644 --- a/.github/workflows/mago.yml +++ b/.github/workflows/mago.yml @@ -11,6 +11,11 @@ jobs: - name: "📥 Fetching Repository Contents" uses: actions/checkout@v4.1.1 + - name: "🔧 Setup PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + - name: Install dependencies run: composer install --dev --prefer-dist --no-progress From e8becb2a7c94f818b746cfc4bd0e14f4184b8440 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Thu, 7 May 2026 09:48:33 -0300 Subject: [PATCH 3/6] Try to fix PHP version issue --- .github/workflows/mago.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mago.yml b/.github/workflows/mago.yml index 4ff73b9054..e036e3d332 100644 --- a/.github/workflows/mago.yml +++ b/.github/workflows/mago.yml @@ -15,6 +15,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: '8.1' + tools: composer:v2 - name: Install dependencies run: composer install --dev --prefer-dist --no-progress From 6d843cfb8f20ac903d9ee74818230d96dff1186b Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Thu, 7 May 2026 09:50:31 -0300 Subject: [PATCH 4/6] Try to fix PHP version issue --- .github/workflows/mago.yml | 10 +++++++--- .github/workflows/phpstan.yml | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mago.yml b/.github/workflows/mago.yml index e036e3d332..bfd0d10c24 100644 --- a/.github/workflows/mago.yml +++ b/.github/workflows/mago.yml @@ -15,13 +15,17 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: '8.1' - tools: composer:v2 + + - name: "🔧 Setup PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' - name: Install dependencies run: composer install --dev --prefer-dist --no-progress - name: "✅ Mago Lint" - run: vendor/bin/mago lint + run: mago lint - name: "🔎 Mago Analyze" - run: vendor/bin/mago analyze + run: mago analyze diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index abbb9cc8aa..1f25d40865 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -14,7 +14,7 @@ jobs: - name: "💽 Installing PHP, Composer, CS2PR" uses: shivammathur/setup-php@2.30.2 with: - php-version: 8.0 + php-version: 8.1 coverage: none ini-values: display_errors = on, error_reporting = E_ALL tools: composer From a80dc03fce06bb86a825a1faf44b016d8fcaf4c3 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Thu, 7 May 2026 09:51:22 -0300 Subject: [PATCH 5/6] Remove duplicate code --- .github/workflows/mago.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/mago.yml b/.github/workflows/mago.yml index bfd0d10c24..8f62ed3b1d 100644 --- a/.github/workflows/mago.yml +++ b/.github/workflows/mago.yml @@ -16,11 +16,6 @@ jobs: with: php-version: '8.1' - - name: "🔧 Setup PHP" - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - - name: Install dependencies run: composer install --dev --prefer-dist --no-progress From 20a01f2ab85674eeed5aa23e844969df512c0e86 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Thu, 7 May 2026 09:52:33 -0300 Subject: [PATCH 6/6] Try to fix vendor path issue --- .github/workflows/mago.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mago.yml b/.github/workflows/mago.yml index 8f62ed3b1d..4ff73b9054 100644 --- a/.github/workflows/mago.yml +++ b/.github/workflows/mago.yml @@ -20,7 +20,7 @@ jobs: run: composer install --dev --prefer-dist --no-progress - name: "✅ Mago Lint" - run: mago lint + run: vendor/bin/mago lint - name: "🔎 Mago Analyze" - run: mago analyze + run: vendor/bin/mago analyze