From b6297f4f2ffbc9352bf3cdd4c932d4a812cf9839 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 09:34:28 +0000 Subject: [PATCH 1/9] Fix for code scanning alert no. 1: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/php-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index 1cc55c0..889db2d 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [main] +permissions: + contents: read + jobs: phpstan: runs-on: ubuntu-latest From 8452e4e3b9da694cc4e2d126127d132dead2fc33 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 09:38:27 +0000 Subject: [PATCH 2/9] Add intl PHP extension to CI workflow --- .github/workflows/php-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index 889db2d..5e8d5c2 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -28,6 +28,7 @@ jobs: with: args: --working-dir=FOSSBilling dev: no + php_extensions: intl - name: Run PHPStan uses: php-actions/phpstan@v3 @@ -62,6 +63,7 @@ jobs: with: args: --working-dir=FOSSBilling/ dev: no + php_extensions: intl - name: Run PHPStan uses: php-actions/phpstan@v3 From a35c92fc82ef60d42fb32db8af9bce27e1fb2a53 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 09:40:55 +0000 Subject: [PATCH 3/9] Update PHP version to 8.3 in CI workflow --- .github/workflows/php-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index 5e8d5c2..44629ae 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -28,6 +28,7 @@ jobs: with: args: --working-dir=FOSSBilling dev: no + php_version: 8.3 php_extensions: intl - name: Run PHPStan @@ -63,6 +64,7 @@ jobs: with: args: --working-dir=FOSSBilling/ dev: no + php_version: 8.3 php_extensions: intl - name: Run PHPStan From a0f4dbae78d7b17a0a8861fee2881b6024ab1ba9 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 09:45:02 +0000 Subject: [PATCH 4/9] Update PHPStan configuration to use PHP 8.3 --- .github/workflows/php-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index 44629ae..ff7dc51 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -34,7 +34,8 @@ jobs: - name: Run PHPStan uses: php-actions/phpstan@v3 with: - php_version: latest + version: latest + php_version: 8.3 configuration: phpstan.neon memory_limit: 512M @@ -70,6 +71,7 @@ jobs: - name: Run PHPStan uses: php-actions/phpstan@v3 with: - php_version: latest + version: latest + php_version: 8.3 configuration: phpstan.neon memory_limit: 512M From 0a2bdfe2cd97ce2c05e5b7ee4f2f3d5008d8793b Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 09:51:05 +0000 Subject: [PATCH 5/9] Remove working directory argument from Composer install --- .github/workflows/php-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index ff7dc51..f50b0d4 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -26,7 +26,6 @@ jobs: - name: Install Composer Dependencies uses: php-actions/composer@v6 with: - args: --working-dir=FOSSBilling dev: no php_version: 8.3 php_extensions: intl @@ -63,7 +62,6 @@ jobs: - name: Install Composer Dependencies uses: php-actions/composer@v6 with: - args: --working-dir=FOSSBilling/ dev: no php_version: 8.3 php_extensions: intl From 9ad1ac9c9674ab828151499c402b4d545f1b5f22 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 09:54:06 +0000 Subject: [PATCH 6/9] Specify working directory for Composer dependencies --- .github/workflows/php-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index f50b0d4..ae4c9c7 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -26,6 +26,7 @@ jobs: - name: Install Composer Dependencies uses: php-actions/composer@v6 with: + args: --working-dir=FOSSBilling dev: no php_version: 8.3 php_extensions: intl @@ -62,6 +63,7 @@ jobs: - name: Install Composer Dependencies uses: php-actions/composer@v6 with: + args: --working-dir=FOSSBilling dev: no php_version: 8.3 php_extensions: intl From a490477de34159e3e7f4305f9cbd33d37dc9b2f7 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 09:59:22 +0000 Subject: [PATCH 7/9] Upgrade GitHub Actions checkout to version 6 --- .github/workflows/php-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index ae4c9c7..d4fda6a 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -15,10 +15,10 @@ jobs: name: PHPStan - FOSSBilling Preview steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Checkout FOSSBilling Source Code - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: "FOSSBilling/FOSSBilling" path: "FOSSBilling" @@ -44,7 +44,7 @@ jobs: name: PHPStan - FOSSBilling Release steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Get the Latest FOSSBilling Release Tag uses: oprypin/find-latest-tag@v1 @@ -54,7 +54,7 @@ jobs: id: get_id - name: Checkout The Release tag - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: "FOSSBilling/FOSSBilling" path: "FOSSBilling" From 3b93a59f7fabbd6746addbb27613917ec55ed364 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 10:04:10 +0000 Subject: [PATCH 8/9] Rename checkout step for FOSSBilling source code --- .github/workflows/php-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index d4fda6a..d2eb959 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Checkout FOSSBilling Source Code + - name: Checkout FOSSBilling uses: actions/checkout@v6 with: repository: "FOSSBilling/FOSSBilling" From 79cf3679a5cae8fcf65700861ecabf6d56e3b449 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sun, 8 Mar 2026 10:12:01 +0000 Subject: [PATCH 9/9] Fix step names in PHP CI workflow --- .github/workflows/php-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index d2eb959..171038a 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -46,14 +46,14 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Get the Latest FOSSBilling Release Tag + - name: Get Latest FOSSBilling Release Tag uses: oprypin/find-latest-tag@v1 with: repository: "FOSSBilling/FOSSBilling" releases-only: true id: get_id - - name: Checkout The Release tag + - name: Checkout Release tag uses: actions/checkout@v6 with: repository: "FOSSBilling/FOSSBilling"