Skip to content

Commit b006d73

Browse files
authored
✨ Laravel v13 (#522)
1 parent d13a937 commit b006d73

49 files changed

Lines changed: 1270 additions & 1021 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
if: "!contains(github.event.head_commit.message, '[ci skip]')"
1717
strategy:
1818
matrix:
19-
php: ['8.2', '8.3', '8.4', '8.5']
19+
php: ['8.3', '8.4', '8.5']
2020

2121
steps:
2222
- name: Checkout the project

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
phpunit.xml
44
/composer.lock
55
/coverage
6+
/scripts/.laravel-version
67
/vendor

composer.json

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,34 +42,34 @@
4242
}
4343
},
4444
"require": {
45-
"php": ">=8.2",
45+
"php": ">=8.3",
4646
"ext-json": "*",
4747
"ext-mbstring": "*",
4848
"dragonmantank/cron-expression": "^3.4",
4949
"guzzlehttp/guzzle": "^7.8",
50-
"illuminate/auth": "^12.0",
51-
"illuminate/cache": "^12.0",
52-
"illuminate/config": "^12.0",
53-
"illuminate/console": "^12.0",
54-
"illuminate/container": "^12.0",
55-
"illuminate/contracts": "^12.0",
56-
"illuminate/cookie": "^12.0",
57-
"illuminate/database": "^12.0",
58-
"illuminate/encryption": "^12.0",
59-
"illuminate/events": "^12.0",
60-
"illuminate/filesystem": "^12.0",
61-
"illuminate/hashing": "^12.0",
62-
"illuminate/http": "^12.0",
63-
"illuminate/log": "^12.0",
64-
"illuminate/pagination": "^12.0",
65-
"illuminate/queue": "^12.0",
66-
"illuminate/routing": "^12.0",
67-
"illuminate/support": "^12.0",
68-
"illuminate/testing": "^12.0",
69-
"illuminate/validation": "^12.0",
70-
"illuminate/view": "^12.0",
50+
"illuminate/auth": "^13.0",
51+
"illuminate/cache": "^13.0",
52+
"illuminate/config": "^13.0",
53+
"illuminate/console": "^13.0",
54+
"illuminate/container": "^13.0",
55+
"illuminate/contracts": "^13.0",
56+
"illuminate/cookie": "^13.0",
57+
"illuminate/database": "^13.0",
58+
"illuminate/encryption": "^13.0",
59+
"illuminate/events": "^13.0",
60+
"illuminate/filesystem": "^13.0",
61+
"illuminate/hashing": "^13.0",
62+
"illuminate/http": "^13.0",
63+
"illuminate/log": "^13.0",
64+
"illuminate/pagination": "^13.0",
65+
"illuminate/queue": "^13.0",
66+
"illuminate/routing": "^13.0",
67+
"illuminate/support": "^13.0",
68+
"illuminate/testing": "^13.0",
69+
"illuminate/validation": "^13.0",
70+
"illuminate/view": "^13.0",
7171
"laravel/prompts": "^0.3.0",
72-
"laravel/serializable-closure": "^1.3|^2.0",
72+
"laravel/serializable-closure": "^2.0",
7373
"league/flysystem": "^3.26",
7474
"ramsey/uuid": "^4.7",
7575
"roots/support": "^1.0",
@@ -80,10 +80,8 @@
8080
"require-dev": {
8181
"laravel/pint": "^1.15",
8282
"mockery/mockery": "^1.6",
83-
"pestphp/pest": "^3.0",
83+
"pestphp/pest": "^4.0",
8484
"phpcompatibility/php-compatibility": "^9.3",
85-
"roave/security-advisories": "dev-master",
86-
"spatie/laravel-ignition": "^2.5",
8785
"spatie/pest-plugin-snapshots": "^2.3",
8886
"spatie/temporary-directory": "^2.2",
8987
"tmarsteel/mockery-callable-mock": "^2.1",

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130

131131
'previous_keys' => [
132132
...array_filter(
133-
explode(',', env('APP_PREVIOUS_KEYS', ''))
133+
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
134134
),
135135
],
136136

config/cache.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
| same cache driver to group types of items stored in your caches.
2828
|
2929
| Supported drivers: "array", "database", "file", "memcached",
30-
| "redis", "dynamodb", "octane", "null"
30+
| "redis", "dynamodb", "octane", "null",
31+
| "failover"
3132
|
3233
*/
3334

@@ -103,6 +104,19 @@
103104
|
104105
*/
105106

106-
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
107+
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
108+
109+
/*
110+
|--------------------------------------------------------------------------
111+
| Serializable Classes
112+
|--------------------------------------------------------------------------
113+
|
114+
| This value determines the classes that can be unserialized from cache
115+
| storage. By default, no PHP classes will be unserialized from your
116+
| cache to prevent gadget chain attacks if your APP_KEY is leaked.
117+
|
118+
*/
119+
120+
'serializable_classes' => false,
107121

108122
];

config/database.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
'url' => env('DB_URL'),
3838
'database' => env('DB_DATABASE', database_path('database.sqlite')),
3939
'prefix' => '',
40-
'prefix_indexes' => null,
4140
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
4241
'busy_timeout' => null,
4342
'journal_mode' => null,
4443
'synchronous' => null,
44+
'transaction_mode' => 'DEFERRED',
4545
],
4646

4747
'wordpress' => [
@@ -59,7 +59,7 @@
5959
'strict' => true,
6060
'engine' => null,
6161
'options' => extension_loaded('pdo_mysql') ? array_filter([
62-
(PHP_VERSION_ID >= 80400 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
62+
(PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
6363
]) : [],
6464
],
6565

@@ -79,7 +79,7 @@
7979
'strict' => true,
8080
'engine' => null,
8181
'options' => extension_loaded('pdo_mysql') ? array_filter([
82-
(PHP_VERSION_ID >= 80400 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
82+
(PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
8383
]) : [],
8484
],
8585

@@ -99,7 +99,7 @@
9999
'strict' => true,
100100
'engine' => null,
101101
'options' => extension_loaded('pdo_mysql') ? array_filter([
102-
(PHP_VERSION_ID >= 80400 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
102+
(PHP_VERSION_ID >= 80500 ? Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
103103
]) : [],
104104
],
105105

@@ -115,7 +115,7 @@
115115
'prefix' => '',
116116
'prefix_indexes' => true,
117117
'search_path' => 'public',
118-
'sslmode' => 'prefer',
118+
'sslmode' => env('DB_SSLMODE', 'prefer'),
119119
],
120120

121121
'sqlsrv' => [
@@ -168,7 +168,7 @@
168168

169169
'options' => [
170170
'cluster' => env('REDIS_CLUSTER', 'redis'),
171-
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
171+
'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'),
172172
'persistent' => env('REDIS_PERSISTENT', false),
173173
],
174174

@@ -179,6 +179,10 @@
179179
'password' => env('REDIS_PASSWORD'),
180180
'port' => env('REDIS_PORT', '6379'),
181181
'database' => env('REDIS_DB', '0'),
182+
'max_retries' => env('REDIS_MAX_RETRIES', 3),
183+
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
184+
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
185+
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
182186
],
183187

184188
'cache' => [
@@ -188,6 +192,10 @@
188192
'password' => env('REDIS_PASSWORD'),
189193
'port' => env('REDIS_PORT', '6379'),
190194
'database' => env('REDIS_CACHE_DB', '1'),
195+
'max_retries' => env('REDIS_MAX_RETRIES', 3),
196+
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
197+
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
198+
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
191199
],
192200

193201
],

config/filesystems.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
'public' => [
4141
'driver' => 'local',
4242
'root' => storage_path('app/public'),
43-
'url' => env('APP_URL').'/storage',
43+
'url' => rtrim((string) env('APP_URL', 'http://localhost'), '/').'/storage',
4444
'visibility' => 'public',
4545
'throw' => false,
4646
'report' => false,

config/logging.php

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

5555
'stack' => [
5656
'driver' => 'stack',
57-
'channels' => explode(',', env('LOG_STACK', 'single')),
57+
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
5858
'ignore_exceptions' => false,
5959
],
6060

@@ -99,7 +99,7 @@
9999
'level' => env('LOG_LEVEL', 'debug'),
100100
'handler' => StreamHandler::class,
101101
'formatter' => env('LOG_STDERR_FORMATTER'),
102-
'with' => [
102+
'handler_with' => [
103103
'stream' => 'php://stderr',
104104
],
105105
'processors' => [PsrLogMessageProcessor::class],

config/mail.php

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
'url' => env('MAIL_URL'),
4242
'host' => env('MAIL_HOST', '127.0.0.1'),
4343
'port' => env('MAIL_PORT', 2525),
44-
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
44+
'scheme' => env('MAIL_SCHEME'),
4545
'username' => env('MAIL_USERNAME'),
4646
'password' => env('MAIL_PASSWORD'),
4747
'timeout' => null,
48-
'local_domain' => env('MAIL_EHLO_DOMAIN'),
48+
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
4949
],
5050

5151
'ses' => [
@@ -54,7 +54,7 @@
5454

5555
'postmark' => [
5656
'transport' => 'postmark',
57-
// 'message_stream_id' => null,
57+
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
5858
// 'client' => [
5959
// 'timeout' => 5,
6060
// ],
@@ -74,12 +74,26 @@
7474
'transport' => 'array',
7575
],
7676

77+
'resend' => [
78+
'transport' => 'resend',
79+
],
80+
7781
'failover' => [
7882
'transport' => 'failover',
7983
'mailers' => [
8084
'smtp',
8185
'log',
8286
],
87+
'retry_after' => 60,
88+
],
89+
90+
'roundrobin' => [
91+
'transport' => 'roundrobin',
92+
'mailers' => [
93+
'ses',
94+
'postmark',
95+
],
96+
'retry_after' => 60,
8397
],
8498

8599
],
@@ -97,26 +111,7 @@
97111

98112
'from' => [
99113
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
100-
'name' => env('MAIL_FROM_NAME', 'Example'),
101-
],
102-
103-
/*
104-
|--------------------------------------------------------------------------
105-
| Markdown Mail Settings
106-
|--------------------------------------------------------------------------
107-
|
108-
| If you are using Markdown based email rendering, you may configure your
109-
| theme and component paths here, allowing you to customize the design
110-
| of the emails. Or, you may simply stick with the Laravel defaults!
111-
|
112-
*/
113-
114-
'markdown' => [
115-
'theme' => env('MAIL_MARKDOWN_THEME', 'default'),
116-
117-
'paths' => [
118-
resource_path('views/vendor/mail'),
119-
],
114+
'name' => env('MAIL_FROM_NAME', env('APP_NAME', 'Laravel')),
120115
],
121116

122117
];

config/services.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
'postmark' => [
18-
'token' => env('POSTMARK_TOKEN'),
18+
'key' => env('POSTMARK_API_KEY'),
1919
],
2020

2121
'ses' => [
@@ -25,7 +25,7 @@
2525
],
2626

2727
'resend' => [
28-
'key' => env('RESEND_KEY'),
28+
'key' => env('RESEND_API_KEY'),
2929
],
3030

3131
'slack' => [

0 commit comments

Comments
 (0)