From 73a537f513836bf8c57ec15133b8e8699a786597 Mon Sep 17 00:00:00 2001 From: ossycodes Date: Wed, 7 May 2025 14:31:53 +0100 Subject: [PATCH 01/11] wip --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 269563f..e46a360 100644 --- a/composer.json +++ b/composer.json @@ -18,12 +18,12 @@ ], "require": { "php": "^7.4|^8.0", - "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0", "guzzlehttp/guzzle": "^7.0" }, "require-dev": { "orchestra/testbench": "^6.0|^7.0|^8.0", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^8.0 || ^9.5 || ^10.5 || ^11.0 || ^12.0" }, "autoload": { "psr-4": { From d497f066b672d2abc002858ab583d737e6fe5391 Mon Sep 17 00:00:00 2001 From: ossycodes Date: Wed, 7 May 2025 14:36:26 +0100 Subject: [PATCH 02/11] wip --- .github/workflows/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 336393a..7058945 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,10 +13,12 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [7.4, 8.0, 8.1] - laravel: [8.*, 9.*, 10.*] + php: [7.4, 8.0, 8.1, 8.2] + laravel: [8.*, 9.*, 10.*, 12.*] stability: [prefer-stable] include: + - laravel: 12.* + testbench: 9.* - laravel: 10.* testbench: 8.* - laravel: 9.* @@ -24,12 +26,14 @@ jobs: - laravel: 8.* testbench: 6.* exclude: - - laravel: 10.* - php: 8.0 - laravel: 10.* php: 7.4 + - laravel: 10.* + php: 8.0 - laravel: 9.* php: 7.4 + - laravel: 12.* + php: 7.4 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} From c5f169d98bde13bbb52f04d7014b277af1affd27 Mon Sep 17 00:00:00 2001 From: ossycodes Date: Wed, 7 May 2025 15:05:10 +0100 Subject: [PATCH 03/11] wip --- .github/workflows/main.yml | 175 +++++++++++++++++++++++++------------ 1 file changed, 120 insertions(+), 55 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7058945..b519fe8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,60 +1,125 @@ name: run-tests on: - push: - branches: [master] - pull_request: - branches: [master] + push: + branches: [master] + pull_request: + branches: [master] jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, windows-latest] - php: [7.4, 8.0, 8.1, 8.2] - laravel: [8.*, 9.*, 10.*, 12.*] - stability: [prefer-stable] - include: - - laravel: 12.* - testbench: 9.* - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: 6.* - exclude: - - laravel: 10.* - php: 7.4 - - laravel: 10.* - php: 8.0 - - laravel: 9.* - php: 7.4 - - laravel: 12.* - php: 7.4 - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo - coverage: none - - - name: Setup problem matchers - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - name: Execute tests - run: vendor/bin/phpunit + test-legacy: + name: Legacy Tests (PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + php: [7.4, 8.0, 8.1] + laravel: [8.*, 9.*, 10.*] + stability: [prefer-stable] + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: 6.* + exclude: + - laravel: 10.* + php: 8.0 + - laravel: 10.* + php: 7.4 + - laravel: 9.* + php: 7.4 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + + - name: Execute tests + run: vendor/bin/phpunit --colors=always + + test-laravel12: + name: Laravel 12 Tests (PHP ${{ matrix.php }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['8.1', '8.2', '8.3'] + laravel: ['^12.0'] + include: + - laravel: '^12.0' + testbench: '^8.0' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --prefer-dist --no-interaction + + - name: Execute tests + run: vendor/bin/phpunit --colors=always + + static-analysis: + name: Static Analysis + runs-on: ubuntu-latest + needs: [test-legacy, test-laravel12] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-interaction + + - name: Run PHPStan + run: vendor/bin/phpstan analyse + + code-style: + name: Code Style + runs-on: ubuntu-latest + needs: [test-legacy, test-laravel12] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-interaction + + - name: Run PHP CS Fixer + run: vendor/bin/php-cs-fixer fix --dry-run --diff From 58a13548e84082c53b4fb41c71c19d6f5de26cee Mon Sep 17 00:00:00 2001 From: ossycodes Date: Wed, 7 May 2025 15:06:36 +0100 Subject: [PATCH 04/11] wip --- .github/workflows/main.yml | 171 +++++++++++-------------------------- 1 file changed, 51 insertions(+), 120 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b519fe8..336393a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,125 +1,56 @@ name: run-tests on: - push: - branches: [master] - pull_request: - branches: [master] + push: + branches: [master] + pull_request: + branches: [master] jobs: - test-legacy: - name: Legacy Tests (PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - php: [7.4, 8.0, 8.1] - laravel: [8.*, 9.*, 10.*] - stability: [prefer-stable] - include: - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: 6.* - exclude: - - laravel: 10.* - php: 8.0 - - laravel: 10.* - php: 7.4 - - laravel: 9.* - php: 7.4 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite - coverage: none - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - - name: Execute tests - run: vendor/bin/phpunit --colors=always - - test-laravel12: - name: Laravel 12 Tests (PHP ${{ matrix.php }}) - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: ['8.1', '8.2', '8.3'] - laravel: ['^12.0'] - include: - - laravel: '^12.0' - testbench: '^8.0' - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite - coverage: none - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --prefer-dist --no-interaction - - - name: Execute tests - run: vendor/bin/phpunit --colors=always - - static-analysis: - name: Static Analysis - runs-on: ubuntu-latest - needs: [test-legacy, test-laravel12] - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite - coverage: none - - - name: Install dependencies - run: composer install --prefer-dist --no-interaction - - - name: Run PHPStan - run: vendor/bin/phpstan analyse - - code-style: - name: Code Style - runs-on: ubuntu-latest - needs: [test-legacy, test-laravel12] - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite - coverage: none - - - name: Install dependencies - run: composer install --prefer-dist --no-interaction - - - name: Run PHP CS Fixer - run: vendor/bin/php-cs-fixer fix --dry-run --diff + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, windows-latest] + php: [7.4, 8.0, 8.1] + laravel: [8.*, 9.*, 10.*] + stability: [prefer-stable] + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: 6.* + exclude: + - laravel: 10.* + php: 8.0 + - laravel: 10.* + php: 7.4 + - laravel: 9.* + php: 7.4 + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + coverage: none + + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + - name: Execute tests + run: vendor/bin/phpunit From 7e91e6fe9d243b3faf5300a60076b76ee5e0598d Mon Sep 17 00:00:00 2001 From: ossycodes Date: Thu, 8 May 2025 12:12:46 +0100 Subject: [PATCH 05/11] wip --- .github/workflows/main.yml | 171 ++++++++++++++++++++++++++----------- phpunit.xml.dist | 10 --- 2 files changed, 120 insertions(+), 61 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 336393a..b519fe8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,56 +1,125 @@ name: run-tests on: - push: - branches: [master] - pull_request: - branches: [master] + push: + branches: [master] + pull_request: + branches: [master] jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, windows-latest] - php: [7.4, 8.0, 8.1] - laravel: [8.*, 9.*, 10.*] - stability: [prefer-stable] - include: - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: 6.* - exclude: - - laravel: 10.* - php: 8.0 - - laravel: 10.* - php: 7.4 - - laravel: 9.* - php: 7.4 - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo - coverage: none - - - name: Setup problem matchers - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - name: Execute tests - run: vendor/bin/phpunit + test-legacy: + name: Legacy Tests (PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + php: [7.4, 8.0, 8.1] + laravel: [8.*, 9.*, 10.*] + stability: [prefer-stable] + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: 6.* + exclude: + - laravel: 10.* + php: 8.0 + - laravel: 10.* + php: 7.4 + - laravel: 9.* + php: 7.4 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + + - name: Execute tests + run: vendor/bin/phpunit --colors=always + + test-laravel12: + name: Laravel 12 Tests (PHP ${{ matrix.php }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['8.1', '8.2', '8.3'] + laravel: ['^12.0'] + include: + - laravel: '^12.0' + testbench: '^8.0' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --prefer-dist --no-interaction + + - name: Execute tests + run: vendor/bin/phpunit --colors=always + + static-analysis: + name: Static Analysis + runs-on: ubuntu-latest + needs: [test-legacy, test-laravel12] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-interaction + + - name: Run PHPStan + run: vendor/bin/phpstan analyse + + code-style: + name: Code Style + runs-on: ubuntu-latest + needs: [test-legacy, test-laravel12] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-interaction + + - name: Run PHP CS Fixer + run: vendor/bin/php-cs-fixer fix --dry-run --diff diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 815fc3b..aa2f19c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,12 +1,7 @@ @@ -14,11 +9,6 @@ tests - - - src/ - - From 64def49986bc2ff9e37499f881c46a896ce9b864 Mon Sep 17 00:00:00 2001 From: ossycodes Date: Thu, 8 May 2025 12:17:41 +0100 Subject: [PATCH 06/11] wip --- .github/workflows/main.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b519fe8..bef4fe6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,10 +20,13 @@ jobs: include: - laravel: 10.* testbench: 8.* + php: 8.1 - laravel: 9.* testbench: 7.* + php: 8.0 - laravel: 8.* testbench: 6.* + php: 7.4 exclude: - laravel: 10.* php: 8.0 @@ -40,13 +43,14 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, fileinfo coverage: none + ini-values: extension=fileinfo.so - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ignore-platform-req=ext-fileinfo - name: Execute tests run: vendor/bin/phpunit --colors=always @@ -57,7 +61,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.1', '8.2', '8.3'] + php: ['8.2', '8.3'] # Removed 8.1 as Laravel 12 requires 8.2+ laravel: ['^12.0'] include: - laravel: '^12.0' @@ -76,7 +80,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update composer update --prefer-dist --no-interaction - name: Execute tests @@ -123,3 +127,4 @@ jobs: - name: Run PHP CS Fixer run: vendor/bin/php-cs-fixer fix --dry-run --diff + From bf88f3a79b086ce17784e4cf73c7a4f1e3139283 Mon Sep 17 00:00:00 2001 From: ossycodes Date: Thu, 8 May 2025 12:24:22 +0100 Subject: [PATCH 07/11] wip --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bef4fe6..0c89a5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,11 +61,11 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.2', '8.3'] # Removed 8.1 as Laravel 12 requires 8.2+ + php: ['8.2', '8.3'] laravel: ['^12.0'] include: - laravel: '^12.0' - testbench: '^8.0' + testbench: '^9.0' # Changed to testbench 9.x for Laravel 12 support steps: - name: Checkout code @@ -127,4 +127,3 @@ jobs: - name: Run PHP CS Fixer run: vendor/bin/php-cs-fixer fix --dry-run --diff - From b4bc429ce7bb7936684da0e68ffbe63cc276ce9f Mon Sep 17 00:00:00 2001 From: ossycodes Date: Thu, 8 May 2025 14:04:17 +0100 Subject: [PATCH 08/11] wip --- .github/workflows/main.yml | 175 +++++++++++-------------------------- 1 file changed, 51 insertions(+), 124 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0c89a5c..336393a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,129 +1,56 @@ name: run-tests on: - push: - branches: [master] - pull_request: - branches: [master] + push: + branches: [master] + pull_request: + branches: [master] jobs: - test-legacy: - name: Legacy Tests (PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - php: [7.4, 8.0, 8.1] - laravel: [8.*, 9.*, 10.*] - stability: [prefer-stable] - include: - - laravel: 10.* - testbench: 8.* - php: 8.1 - - laravel: 9.* - testbench: 7.* - php: 8.0 - - laravel: 8.* - testbench: 6.* - php: 7.4 - exclude: - - laravel: 10.* - php: 8.0 - - laravel: 10.* - php: 7.4 - - laravel: 9.* - php: 7.4 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, fileinfo - coverage: none - ini-values: extension=fileinfo.so - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ignore-platform-req=ext-fileinfo - - - name: Execute tests - run: vendor/bin/phpunit --colors=always - - test-laravel12: - name: Laravel 12 Tests (PHP ${{ matrix.php }}) - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: ['8.2', '8.3'] - laravel: ['^12.0'] - include: - - laravel: '^12.0' - testbench: '^9.0' # Changed to testbench 9.x for Laravel 12 support - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite - coverage: none - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update - composer update --prefer-dist --no-interaction - - - name: Execute tests - run: vendor/bin/phpunit --colors=always - - static-analysis: - name: Static Analysis - runs-on: ubuntu-latest - needs: [test-legacy, test-laravel12] - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite - coverage: none - - - name: Install dependencies - run: composer install --prefer-dist --no-interaction - - - name: Run PHPStan - run: vendor/bin/phpstan analyse - - code-style: - name: Code Style - runs-on: ubuntu-latest - needs: [test-legacy, test-laravel12] - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite - coverage: none - - - name: Install dependencies - run: composer install --prefer-dist --no-interaction - - - name: Run PHP CS Fixer - run: vendor/bin/php-cs-fixer fix --dry-run --diff + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, windows-latest] + php: [7.4, 8.0, 8.1] + laravel: [8.*, 9.*, 10.*] + stability: [prefer-stable] + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: 6.* + exclude: + - laravel: 10.* + php: 8.0 + - laravel: 10.* + php: 7.4 + - laravel: 9.* + php: 7.4 + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + coverage: none + + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + - name: Execute tests + run: vendor/bin/phpunit From 6b7370b11bd04aede295f789da9bfe07f3dbae21 Mon Sep 17 00:00:00 2001 From: ossycodes Date: Thu, 8 May 2025 14:09:18 +0100 Subject: [PATCH 09/11] wip --- composer.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index e46a360..b8d7a85 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "captcha", "laravel" ], - "homepage": "https://github.com/:vendor/:package_name", + "homepage": "https://github.com/ossycodes/friendlycaptcha", "license": "MIT", "type": "library", "authors": [ @@ -17,12 +17,12 @@ } ], "require": { - "php": "^7.4|^8.0", + "php": "^7.4|^8.0|^8.1|^8.2|^8.3", "illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0", "guzzlehttp/guzzle": "^7.0" }, "require-dev": { - "orchestra/testbench": "^6.0|^7.0|^8.0", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", "phpunit/phpunit": "^8.0 || ^9.5 || ^10.5 || ^11.0 || ^12.0" }, "autoload": { @@ -40,7 +40,11 @@ "test-coverage": "vendor/bin/phpunit --coverage-html coverage" }, "config": { - "sort-packages": true + "sort-packages": true, + "platform-check": false, + "allow-plugins": { + "php-http/discovery": true + } }, "extra": { "laravel": { From 652c246f8202f8fb7cb85960eeefe7ab8d34d4b0 Mon Sep 17 00:00:00 2001 From: ossycodes Date: Thu, 8 May 2025 14:15:22 +0100 Subject: [PATCH 10/11] wip --- phpunit.xml.dist | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index aa2f19c..ad60b74 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,7 @@ -tests + + + + + + + - - - - - + + - + From 37eaa5ed9d233f3d46d353659ba88c2dd61f8e46 Mon Sep 17 00:00:00 2001 From: ossycodes Date: Thu, 8 May 2025 14:27:27 +0100 Subject: [PATCH 11/11] wip --- phpunit.xml.dist | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ad60b74..b2d890b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -11,18 +11,7 @@ tests - - - - - - - - - - - - + \ No newline at end of file