Skip to content

Commit

Permalink
Merge pull request #38 from Lukasss93/update-laravel
Browse files Browse the repository at this point in the history
Support for Laravel 11
  • Loading branch information
Lukasss93 authored Mar 14, 2024
2 parents 62b00bd + bb2f3a2 commit d652229
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 52 deletions.
47 changes: 14 additions & 33 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,31 +28,31 @@ 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.*
- laravel: 9.*
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 }}

steps:
- 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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ composer.lock
phpinsights.json
coverage.xml
composer.phar
/.phpunit.cache/
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<psalm
errorLevel="6"
errorLevel="7"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Expand Down
1 change: 1 addition & 0 deletions src/Console/LarexInsertCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public function handle(): int
$languages = $header->skip(2)->values();

//initialize data
/** @var Collection<int, string> $data */
$data = collect([]);

//iterate until user confirm the inserted data
Expand Down
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)));

/*
Expand Down

0 comments on commit d652229

Please sign in to comment.