diff --git a/testapp/.gitignore b/testapp/.gitignore index 0f7df0f..ce7b900 100644 --- a/testapp/.gitignore +++ b/testapp/.gitignore @@ -10,3 +10,4 @@ Homestead.json Homestead.yaml npm-debug.log yarn-error.log +.phpunit.cache diff --git a/testapp/app/Http/Kernel.php b/testapp/app/Http/Kernel.php index 9934167..39c16a5 100644 --- a/testapp/app/Http/Kernel.php +++ b/testapp/app/Http/Kernel.php @@ -16,7 +16,7 @@ class Kernel extends HttpKernel protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, - \Fruitcake\Cors\HandleCors::class, + \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, diff --git a/testapp/app/Http/Middleware/TrustProxies.php b/testapp/app/Http/Middleware/TrustProxies.php index 14befce..cf5a02c 100644 --- a/testapp/app/Http/Middleware/TrustProxies.php +++ b/testapp/app/Http/Middleware/TrustProxies.php @@ -2,8 +2,8 @@ namespace App\Http\Middleware; -use Fideloper\Proxy\TrustProxies as Middleware; use Illuminate\Http\Request; +use Illuminate\Http\Middleware\TrustProxies as Middleware; class TrustProxies extends Middleware { @@ -19,5 +19,5 @@ class TrustProxies extends Middleware * * @var int */ - protected $headers = Request::HEADER_X_FORWARDED_ALL; + protected $headers = Request::HEADER_X_FORWARDED_FOR; } diff --git a/testapp/composer.json b/testapp/composer.json index 02fd0ef..8fdb349 100644 --- a/testapp/composer.json +++ b/testapp/composer.json @@ -14,20 +14,18 @@ } ], "require": { - "php": "^7.3|^8.0", - "fideloper/proxy": "^4.4", - "fruitcake/laravel-cors": "^2.0", + "php": ">=8.0", "guzzlehttp/guzzle": "^7.0.1", - "laravel/framework": "^8.12", + "laravel/framework": "^10.0.0", "laravel/tinker": "^2.5", "ipinfo/ipinfolaravel": "*" }, "require-dev": { - "facade/ignition": "^2.5", + "spatie/laravel-ignition": "^2.2", "fakerphp/faker": "^1.9.1", "mockery/mockery": "^1.4.2", - "nunomaduro/collision": "^5.0", - "phpunit/phpunit": "^9.3.3" + "nunomaduro/collision": "^7.7", + "phpunit/phpunit": "^10.2.2" }, "config": { "optimize-autoloader": true, diff --git a/testapp/phpunit.xml b/testapp/phpunit.xml index 4ae4d97..95140ba 100644 --- a/testapp/phpunit.xml +++ b/testapp/phpunit.xml @@ -1,31 +1,33 @@ - - - ./tests/Unit - - - ./tests/Feature - - - - - ./app - - - - - - - - - - - - - + + + ./tests/Unit + + + ./tests/Feature + + + + + + + + + + + + + + + + + ./app + +