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

Migrate to spatie/laravel-html #726

Merged
merged 6 commits into from
Oct 2, 2023
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
5 changes: 2 additions & 3 deletions .github/workflows/laravel-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ on:
pull_request: {}
jobs:
laravel-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
php-versions:
- 7.3 # current production
- 8.0 # target, https://github.com/UTRS2/utrs/issues/375
- 8.2
services:
mysql:
image: mariadb:10.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function search(Request $request)

/** @var User $user */
$user = $request->user();

$search = $request->validate(['search' => 'required|min:1'])['search'];

$number = is_numeric($search) ? intval($search) : null;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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,
Expand Down
9 changes: 7 additions & 2 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Middleware;

use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;

class TrustProxies extends Middleware
Expand All @@ -23,5 +23,10 @@ class TrustProxies extends Middleware
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}
48 changes: 22 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,34 @@
],
"license": "MIT",
"require": {
"php": "~7.3|^8.0",
"php": "^8",
"ext-json": "*",
"addwiki/mediawiki-api": "^2.8",
"addwiki/mediawiki-api-base": "^2.8",
"doctrine/dbal": "^3.1",
"fideloper/proxy": "^4.0",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.7.0",
"doctrine/dbal": "^3.7",
"guzzlehttp/guzzle": "^7",
"khill/lavacharts": "^3.1",
"laravel/framework": "^8.15",
"laravel/slack-notification-channel": "^2.3",
"laravel/socialite": "^5.1",
"laravel/tinker": "^2.5",
"laravelcollective/html": "^6.2",
"league/commonmark": "^1.3",
"spatie/laravel-backup": "^6.10",
"taavi/laravel-socialite-mediawiki": "^1.3",
"taavi/laravel-torblock": "^1.1",
"laravel/framework": "^10",
"laravel/socialite": "^5",
"laravel/tinker": "^2",
"league/commonmark": "^2",
"marvinlabs/laravel-discord-logger": "^1.4",
"spatie/laravel-backup": "^8",
"taavi/laravel-socialite-mediawiki": "^1.6",
"taavi/laravel-torblock": "^2",
"tio/laravel": "^1.23",
"wikimedia/ip-utils": "^3.0"
"wikimedia/ip-utils": "^4|^5",
"spatie/laravel-html": "^3.2"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.5",
"barryvdh/laravel-ide-helper": "^2.7",
"facade/ignition": "^2.5.2",
"fakerphp/faker": "^1.12",
"laravel/dusk": "^6.25.2",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^5.1.0",
"barryvdh/laravel-debugbar": "^3.9",
"barryvdh/laravel-ide-helper": "^2.13",
"spatie/laravel-ignition": "^2.3",
"fakerphp/faker": "^1.23",
"laravel/dusk": "^7",
"mockery/mockery": "^1.5",
"nunomaduro/collision": "^7.9",
"php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^10.3",
"taavi/faker-acceptlanguage": "^1.0"
},
"config": {
Expand All @@ -58,7 +54,7 @@
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
Expand Down
Loading
Loading