diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d0b4613..7df0107 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,17 +17,7 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }} - restore-keys: | - ${{ runner.os }}-php- - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' run: composer install --no-progress --no-ansi - name: Run Psalm @@ -38,8 +28,8 @@ jobs: strategy: fail-fast: false matrix: - php: [ 8.0, 8.1, 8.2 ] - laravel: [ 8.*, 9.*, 10.* ] + php: [ 8.0, 8.1, 8.2, 8.3 ] + laravel: [ 8.*, 9.*, 10.*, 11.* ] include: - laravel: 8.* testbench: 6.* @@ -47,9 +37,15 @@ jobs: testbench: 7.* - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* exclude: - php: 8.0 laravel: 10.* + - php: 8.0 + laravel: 11.* + - php: 8.1 + laravel: 11.* name: Laravel ${{ matrix.laravel }} with PHP ${{ matrix.php }} @@ -57,12 +53,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Cache dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache/files - key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -71,8 +61,9 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --prefer-dist --no-interaction --no-suggest + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update + composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update + composer update --prefer-dist --no-interaction - name: Execute tests run: composer run-script test @@ -87,27 +78,17 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.0 coverage: xdebug - name: Validate composer.json and composer.lock run: composer validate - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-php-8.2-${{ hashFiles('**/composer.json') }} - restore-keys: | - ${{ runner.os }}-php-8.2- - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-interaction --no-suggest + run: composer install --prefer-dist --no-interaction - name: Run test suite - uses: paambaati/codeclimate-action@v3.2.0 + uses: paambaati/codeclimate-action@v5.0.0 env: CC_TEST_REPORTER_ID: ${{ secrets.CC_REPORTER_ID }} with: diff --git a/.gitignore b/.gitignore index 2391b68..f7d09b1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.lock phpinsights.json coverage.xml composer.phar +/.phpunit.cache/ diff --git a/README.md b/README.md index 163eb9f..7b69082 100644 --- a/README.md +++ b/README.md @@ -196,19 +196,19 @@ composer test ## 🔰 Version Support -| Larex | L5.8 | L6.x | L7.x | L8.x | L9.x | L10.x | -|:----------------:|:----:|:----:|:----:|:----:|:----:|:-----:| -| ^1.0 | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | -| ^1.2 | ^2.0 | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | -| ^3.0 | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | -| ^4.0 | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | - -| Larex | PHP7.2 | PHP7.3 | PHP7.4 | PHP8.0 | PHP8.1 | PHP8.2 | -|:----------------:|:------:|:------:|:------:|:------:|:------:|:------:| -| ^1.0 | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | -| ^1.6 | ^2.0 | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | -| ^3.0 | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | -| ^4.0 | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | +| Larex | L5.8 | L6.x | L7.x | L8.x | L9.x | L10.x | L11.x | +|:----------------:|:----:|:----:|:----:|:----:|:----:|:-----:|-------| +| ^1.0 | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| ^1.2 | ^2.0 | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| ^3.0 | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | +| ^4.0 | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | + +| Larex | PHP7.2 | PHP7.3 | PHP7.4 | PHP8.0 | PHP8.1 | PHP8.2 | PHP8.3 | +|:----------------:|:------:|:------:|:------:|:------:|:------:|:------:|--------| +| ^1.0 | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | +| ^1.6 | ^2.0 | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | +| ^3.0 | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | +| ^4.0 | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ## 📃 Changelog diff --git a/composer.json b/composer.json index b03129e..c45cdeb 100644 --- a/composer.json +++ b/composer.json @@ -24,16 +24,16 @@ "php": "^8.0", "ext-dom": "*", "ext-json": "*", - "illuminate/support": "^8.0|^9.0|^10.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", "loilo/fuse": "^6.4.6", "spatie/simple-excel": "^3.0.1", "spatie/laravel-collection-macros": "^7.12" }, "require-dev": { - "orchestra/testbench": "^6.0|^7.0|^8.0", - "pestphp/pest": "^1.21", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", + "pestphp/pest": "^v1.0|^v2.0", "psalm/plugin-laravel": "^2.0", - "vimeo/psalm": "^4.24" + "vimeo/psalm": "^5.0" }, "autoload": { "psr-4": { diff --git a/psalm.xml b/psalm.xml index c3026f0..b5a37f9 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,6 @@ skip(2)->values(); //initialize data + /** @var Collection $data */ $data = collect([]); //iterate until user confirm the inserted data diff --git a/tests/Pest.php b/tests/Pest.php index d23edf1..3e8213d 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -56,7 +56,7 @@ | */ -expect()->extend('fileContent', fn () => $this->and(File::get($this->value))); +expect()->extend('fileContent', fn () => $this->and($this->value = File::get($this->value))); expect()->extend('toEqualStub', fn (string $name, $eol = "\n") => $this->toEqual(getTestStub($name, $eol))); /*