From 807d145a3c071dc0e69bb7e6783611e2591f9773 Mon Sep 17 00:00:00 2001 From: Julius Kiekbusch Date: Thu, 15 Feb 2024 11:40:48 +0100 Subject: [PATCH] Add Laravel/Illuminate 11 Support (#461) * Add Laravel 11 Support * Show Illuminate version in matrix * Allow dev versions * Exclude Laravel 11 on PHP 8.1 * Update nicmart/tree to ^0.8 --- .github/workflows/run-tests.yml | 12 +++++++++--- composer.json | 11 +++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 76c8b69..9c3ddb8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,13 +10,17 @@ jobs: matrix: os: [ubuntu-latest] php: [8.3, 8.2, 8.1] + illuminate: [10.*, 11.*] dependency-version: [prefer-lowest, prefer-stable] + exclude: + - php: 8.1 + illuminate: 11.* - name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} + name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - I ${{ matrix.illuminate }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Puppeteer run: npm install puppeteer @@ -38,7 +42,9 @@ jobs: coverage: none - name: Install dependencies - run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-source + run: | + composer require "laravel/framework:${{ matrix.illuminate }}" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --no-interaction --prefer-source - name: Execute tests run: vendor/bin/pest diff --git a/composer.json b/composer.json index 1f4e980..8ed90fe 100644 --- a/composer.json +++ b/composer.json @@ -19,11 +19,11 @@ "php": "^8.1", "guzzlehttp/guzzle": "^7.3", "guzzlehttp/psr7": "^2.0", - "illuminate/collections": "^10.0", - "nicmart/tree": "^0.3.0", + "illuminate/collections": "^10.0|^11.0", + "nicmart/tree": "^0.8.0", "spatie/browsershot": "^3.45|^4.0", "spatie/robots-txt": "^2.0", - "symfony/dom-crawler": "^6.0 | ^7.0" + "symfony/dom-crawler": "^6.0|^7.0" }, "require-dev": { "pestphp/pest": "^2.0", @@ -46,7 +46,6 @@ "Spatie\\Crawler\\Test\\": "tests" } }, - "scripts": { - "test": "phpunit" - } + "minimum-stability": "dev", + "prefer-stable": true }