Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11 #16

Merged
merged 13 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@ name: run-tests

on:
push:
branches: [main]
branches: [ main ]
pull_request:
branches: [main]
branches: [ main ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2]
laravel: [9.*, 10.*]
stability: [prefer-lowest, prefer-stable]
os: [ ubuntu-latest ]
php: [ 8.1, 8.2, 8.3 ]
laravel: [10.*, 11.* ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
exclude:
- php: 8.1
laravel: 11.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
"php": "^8.1",
"amphp/amp": "^v3.0",
"amphp/parallel": "^2.2",
"illuminate/collections": "^9.30|^10.0",
"illuminate/collections": "^10.0|^11.0",
"spatie/laravel-package-tools": "^1.4.3",
"symfony/finder" : "^6.0|^7.0"
},
"require-dev": {
"illuminate/console": "^9.30|^10.0",
"illuminate/console": "^10.0|^11.0",
"laravel/pint": "^1.0",
"nunomaduro/collision": "^6.0",
"nunomaduro/collision": "^7.0|^8.0",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^7.0|^8.0",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"orchestra/testbench": "^7.0|^8.0|^9.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.5|^10.0",
"spatie/laravel-ray": "^1.26"
},
"autoload": {
Expand All @@ -49,7 +49,6 @@
}
},
"scripts": {
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
Expand Down
10 changes: 5 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ parameters:
count: 1
path: src/Data/DiscoveredClass.php

-
message: "#^Casting class ReflectionType to string is deprecated\\.$#"
count: 2
path: src/Data/DiscoveredEnum.php

-
message: "#^Parameter \\$file of class Spatie\\\\StructureDiscoverer\\\\Data\\\\DiscoveredEnum constructor expects string, string\\|false given\\.$#"
count: 1
Expand All @@ -20,11 +25,6 @@ parameters:
count: 1
path: src/Data/DiscoveredTrait.php

-
message: "#^Unable to resolve the template type T in call to function Amp\\\\Promise\\\\wait$#"
count: 1
path: src/DiscoverWorkers/ParallelDiscoverWorker.php

-
message: "#^Match arm is unreachable because previous comparison is always true\\.$#"
count: 1
Expand Down
14 changes: 7 additions & 7 deletions tests/CacheDriversTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,30 @@
})->with([
'laravel' => [
new LaravelDiscoverCacheDriver(),
fn () => fn () => cache()->has('discoverer-cache-test'),
fn () => cache()->has('discoverer-cache-test'),
],
'laravel with prefix' => [
new LaravelDiscoverCacheDriver(prefix: 'prefixed'),
fn () => fn () => cache()->has('prefixed-discoverer-cache-test'),
fn () => cache()->has('prefixed-discoverer-cache-test'),
],
'laravel with store' => [
new LaravelDiscoverCacheDriver(store: 'file'),
fn () => fn () => cache()->driver('file')->has('discoverer-cache-test'),
fn () => cache()->driver('file')->has('discoverer-cache-test'),
],
'file serialized' => [
new FileDiscoverCacheDriver(__DIR__.'/temp'),
fn () => fn () => file_exists(__DIR__.'/temp/discoverer-cache-test'),
fn () => file_exists(__DIR__.'/temp/discoverer-cache-test'),
],
'file using php' => [
new FileDiscoverCacheDriver(__DIR__.'/temp', serialize: false),
fn () => fn () => file_exists(__DIR__.'/temp/discoverer-cache-test'),
fn () => file_exists(__DIR__.'/temp/discoverer-cache-test'),
],
'file with alternative filename' => [
new FileDiscoverCacheDriver(__DIR__.'/temp', filename: 'discovered.php'),
fn () => fn () => file_exists(__DIR__.'/temp/discovered.php'),
fn () => file_exists(__DIR__.'/temp/discovered.php'),
],
'static' => [
new StaticDiscoverCacheDriver(),
fn () => fn () => array_key_exists('test', StaticDiscoverCacheDriver::$entries),
fn () => array_key_exists('test', StaticDiscoverCacheDriver::$entries),
],
]);
Loading