Skip to content

Commit 843ae31

Browse files
authored
Merge pull request render-examples#42 from paulprins/master
Upgrade to Laravel 11, PHP 8.2.7, PHP-FPM 3.1.6
2 parents 3e3a2a7 + d3e901a commit 843ae31

File tree

8 files changed

+4912
-1929
lines changed

8 files changed

+4912
-1929
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM richarvey/nginx-php-fpm:1.9.1
1+
FROM richarvey/nginx-php-fpm:3.1.6
22

33
COPY . .
44

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel 5.8 with a Docker PHP Image
1+
# Laravel 11 with a Docker PHP Image
22

33
A demo repo for deploying a Laravel PHP application on [Render](https://render.com) using Docker. You can follow the getting started tutorial [here](https://render.com/docs/deploy-php-laravel-docker).
44

@@ -15,8 +15,8 @@ A demo repo for deploying a Laravel PHP application on [Render](https://render.c
1515

1616
| Key | Value |
1717
| --------------- | --------------- |
18-
| `DATABASE_URL` | The **internal connection string** for the database you created above. |
19-
| `DB_CONNECTION` | `pgsql` |
2018
| `APP_KEY` | Copy the output of `php artisan key:generate --show` |
19+
| `DATABASE_URL` | The **internal database url** for the database you created above. |
20+
| `DB_CONNECTION` | `pgsql` |
2121

22-
That's it! Your Laravel 5.8 app will be live on your Render URL as soon as the build finishes. You can test it out by registering and logging in.
22+
That's it! Your Laravel 11 app will be live on your Render URL as soon as the build finishes. You can test it out by registering and logging in.

app/Exceptions/Handler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Exceptions;
44

5-
use Exception;
5+
use Throwable;
66
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
77

88
class Handler extends ExceptionHandler
@@ -32,7 +32,7 @@ class Handler extends ExceptionHandler
3232
* @param \Exception $exception
3333
* @return void
3434
*/
35-
public function report(Exception $exception)
35+
public function report(Throwable $exception)
3636
{
3737
parent::report($exception);
3838
}
@@ -44,7 +44,7 @@ public function report(Exception $exception)
4444
* @param \Exception $exception
4545
* @return \Illuminate\Http\Response
4646
*/
47-
public function render($request, Exception $exception)
47+
public function render($request, Throwable $exception)
4848
{
4949
return parent::render($request, $exception);
5050
}

app/Http/Middleware/TrustProxies.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace App\Http\Middleware;
44

55
use Illuminate\Http\Request;
6-
use Fideloper\Proxy\TrustProxies as Middleware;
6+
use Illuminate\Http\Middleware\TrustProxies as Middleware;
77

88
class TrustProxies extends Middleware
99
{
@@ -19,5 +19,10 @@ class TrustProxies extends Middleware
1919
*
2020
* @var int
2121
*/
22-
protected $headers = Request::HEADER_X_FORWARDED_ALL;
22+
protected $headers =
23+
Request::HEADER_X_FORWARDED_FOR |
24+
Request::HEADER_X_FORWARDED_HOST |
25+
Request::HEADER_X_FORWARDED_PORT |
26+
Request::HEADER_X_FORWARDED_PROTO |
27+
Request::HEADER_X_FORWARDED_AWS_ELB;
2328
}

composer.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,16 @@
88
],
99
"license": "MIT",
1010
"require": {
11-
"php": "^7.1.3",
12-
"fideloper/proxy": "^4.0",
13-
"laravel/framework": "5.8.*",
14-
"laravel/tinker": "^1.0"
11+
"php": "^8.0",
12+
"laravel/framework": "^11.0",
13+
"laravel/tinker": "^2.9"
1514
},
1615
"require-dev": {
17-
"beyondcode/laravel-dump-server": "^1.0",
18-
"filp/whoops": "^2.0",
19-
"fzaninotto/faker": "^1.4",
20-
"mockery/mockery": "^1.0",
21-
"nunomaduro/collision": "^3.0",
22-
"phpunit/phpunit": "^7.5"
16+
"filp/whoops": "^2.15",
17+
"fakerphp/faker": "^1.23",
18+
"mockery/mockery": "^1.6",
19+
"nunomaduro/collision": "^8.1",
20+
"phpunit/phpunit": "^11.0"
2321
},
2422
"config": {
2523
"optimize-autoloader": true,

0 commit comments

Comments
 (0)