Skip to content
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore

phpunit.php export-ignore
phpunit.xml export-ignore
51 changes: 3 additions & 48 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ]
laravel: [ "7.0", "8.0", "9.0", "10.0", "11.0", "12.0" ]
exclude:
- laravel: "7.0"
php: "8.1"

- laravel: "7.0"
php: "8.2"

- laravel: "7.0"
php: "8.3"

- laravel: "7.0"
php: "8.4"

- laravel: "9.0"
php: "7.4"

- laravel: "9.0"
php: "8.3"

- laravel: "9.0"
php: "8.4"

- laravel: "10.0"
php: "7.4"

- laravel: "10.0"
php: "8.0"

- laravel: "11.0"
php: "7.4"

- laravel: "11.0"
php: "8.0"

- laravel: "11.0"
php: "8.1"

- laravel: "12.0"
php: "7.4"

- laravel: "12.0"
php: "8.0"

- laravel: "12.0"
php: "8.1"
php: [ "8.2", "8.3", "8.4" ]
laravel: [ "10.0", "11.0", "12.0" ]

name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}

Expand All @@ -74,4 +29,4 @@ jobs:
run: composer require --dev laravel/framework:^${{ matrix.laravel }}

- name: Execute tests
run: sudo vendor/bin/phpunit
run: composer test
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.2",
"fig/http-message-util": "^1.1",
"illuminate/routing": "^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0"
"illuminate/routing": "^10.0 || ^11.0 || ^12.0"
},
"require-dev": {
"orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
"phpunit/phpunit": "^9.6 || ^10.0 || ^11.0 || ^12.0"
"orchestra/testbench": "^8.0 || ^9.0 || ^10.0",
"phpunit/phpunit": "^10.0 || ^11.0 || ^12.0"
},
"minimum-stability": "stable",
"prefer-stable": true,
Expand Down Expand Up @@ -71,7 +71,7 @@
}
},
"scripts": {
"test": "@php vendor/bin/phpunit --coverage-text",
"test-coverage": "@test --coverage-html=.build/phpunit/"
"test": "@php vendor/bin/phpunit",
"test-coverage": "@test --coverage-text --coverage-html=.build/phpunit/"
}
}
30 changes: 0 additions & 30 deletions phpunit.php

This file was deleted.

26 changes: 9 additions & 17 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupStaticAttributes="false"
bootstrap="phpunit.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="false"
convertWarningsToExceptions="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResult="false"
colors="true"
>
<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">./src</directory>
<directory>./src</directory>
</include>
</coverage>
</source>
<testsuites>
<testsuite name="Test Suite">
<directory suffix="Test.php">./tests</directory>
<directory>./tests</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion src/Helpers/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function show(array $methods, string $uri): ?string
protected function hasMethods(array $route, array $aliases): bool
{
foreach ($route as $value) {
if (in_array($value, $aliases)) {
if (in_array($value, $aliases, true)) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function getProtectedRouteNames(): array
/**
* @return (callable(string, self): string)|string
*/
protected function getRouteNamesExtender()
protected function getRouteNamesExtender(): callable|string|null
{
return config('route.names.extender') ?: static fn (string $name): string => $name;
}
Expand Down