Skip to content

Commit bb4f8cb

Browse files
author
AmirHossein Fallah
committed
Merge upstream Laravel 12.x changes
- Resolve conflict in ProcessDriver.php by adopting upstream base64_encode approach - Update Concurrency feature to use base64 encoding for serialized closures - Maintain timeout functionality and error handling enhancements - Sync with latest Laravel framework changes and improvements
2 parents 0e058e2 + 2d0d6f5 commit bb4f8cb

File tree

500 files changed

+10319
-4039
lines changed

Some content is hidden

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

500 files changed

+10319
-4039
lines changed

.github/workflows/tests.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
ports:
2020
- 11211:11211
2121
mysql:
22-
image: mysql:5.7
22+
image: mysql:8
2323
env:
2424
MYSQL_ALLOW_EMPTY_PASSWORD: yes
2525
MYSQL_DATABASE: forge
@@ -40,17 +40,20 @@ jobs:
4040
fail-fast: true
4141
matrix:
4242
php: [8.2, 8.3, 8.4]
43-
phpunit: ['10.5.35', '11.5.3', '12.0.0', '12.2.0']
43+
phpunit: ['10.5.35', '11.5.3', '12.0.0', '12.3.0']
4444
stability: [prefer-lowest, prefer-stable]
4545
exclude:
4646
- php: 8.2
4747
phpunit: '12.0.0'
4848
- php: 8.2
49-
phpunit: '12.2.0'
49+
phpunit: '12.3.0'
5050
include:
5151
- php: 8.3
5252
phpunit: '12.1.0'
5353
stability: prefer-stable
54+
- php: 8.3
55+
phpunit: '12.2.0'
56+
stability: prefer-stable
5457

5558
name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }}
5659

@@ -73,6 +76,15 @@ jobs:
7376
- name: Set Framework version
7477
run: composer config version "12.x-dev"
7578

79+
- name: Set Minimum dependencies for `prefer-lowest`
80+
uses: nick-fields/retry@v3
81+
with:
82+
timeout_minutes: 5
83+
max_attempts: 5
84+
command: composer require opis/string:2.0.1 --no-interaction --no-update
85+
shell: bash
86+
if: matrix.stability == 'prefer-lowest'
87+
7688
- name: Install dependencies
7789
uses: nick-fields/retry@v3
7890
with:
@@ -105,13 +117,20 @@ jobs:
105117
fail-fast: true
106118
matrix:
107119
php: [8.2, 8.3, 8.4]
108-
phpunit: ['10.5.35', '11.5.3', '12.0.0', '12.1.0']
120+
phpunit: ['10.5.35', '11.5.3', '12.0.0', '12.3.0']
109121
stability: [prefer-lowest, prefer-stable]
110122
exclude:
111123
- php: 8.2
112124
phpunit: '12.0.0'
113125
- php: 8.2
126+
phpunit: '12.3.0'
127+
include:
128+
- php: 8.3
114129
phpunit: '12.1.0'
130+
stability: prefer-stable
131+
- php: 8.3
132+
phpunit: '12.2.0'
133+
stability: prefer-stable
115134

116135
name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }} - Windows
117136

@@ -135,6 +154,15 @@ jobs:
135154
- name: Set Framework version
136155
run: composer config version "12.x-dev"
137156

157+
- name: Set Minimum dependencies for `prefer-lowest`
158+
uses: nick-fields/retry@v3
159+
with:
160+
timeout_minutes: 5
161+
max_attempts: 5
162+
command: composer require opis/string:2.0.1 --no-interaction --no-update
163+
shell: bash
164+
if: matrix.stability == 'prefer-lowest'
165+
138166
- name: Install dependencies
139167
uses: nick-fields/retry@v3
140168
with:

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
.DS_Store
2+
.phpunit.result.cache
3+
/.fleet
4+
/.idea
15
/.phpunit.cache
6+
/phpunit.xml
7+
/.vscode
28
/vendor
39
composer.phar
410
composer.lock
5-
.DS_Store
611
Thumbs.db
7-
/phpunit.xml
8-
/.idea
9-
/.fleet
10-
/.vscode
11-
.phpunit.result.cache

CHANGELOG.md

Lines changed: 242 additions & 1 deletion
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
66
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
77
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
8+
<a href="https://insights.linuxfoundation.org/project/laravel-framework"><img src="https://insights.linuxfoundation.org/api/badge/health-score?project=laravel-framework" alt="Health score"></a>
89
</p>
910

1011
## About Laravel

bin/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ git tag $VERSION
5252
git push origin --tags
5353

5454
# Tag Components
55-
for REMOTE in auth broadcasting bus cache collections conditionable config console container contracts cookie database encryption events filesystem hashing http log macroable mail notifications pagination pipeline process queue redis routing session support testing translation validation view
55+
for REMOTE in auth broadcasting bus cache collections conditionable config console container contracts cookie database encryption events filesystem hashing http json-schema log macroable mail notifications pagination pipeline process queue redis routing session support testing translation validation view
5656
do
5757
echo ""
5858
echo ""

bin/split.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ remote events [email protected]:illuminate/events.git
3535
remote filesystem [email protected]:illuminate/filesystem.git
3636
remote hashing [email protected]:illuminate/hashing.git
3737
remote http [email protected]:illuminate/http.git
38+
remote json-schema [email protected]:illuminate/json-schema.git
3839
remote log [email protected]:illuminate/log.git
3940
remote macroable [email protected]:illuminate/macroable.git
4041
remote mail [email protected]:illuminate/mail.git
@@ -69,6 +70,7 @@ split 'src/Illuminate/Events' events
6970
split 'src/Illuminate/Filesystem' filesystem
7071
split 'src/Illuminate/Hashing' hashing
7172
split 'src/Illuminate/Http' http
73+
split 'src/Illuminate/JsonSchema' json-schema
7274
split 'src/Illuminate/Log' log
7375
split 'src/Illuminate/Macroable' macroable
7476
split 'src/Illuminate/Mail' mail

composer.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"ext-session": "*",
2525
"ext-tokenizer": "*",
2626
"composer-runtime-api": "^2.2",
27-
"brick/math": "^0.11|^0.12|^0.13",
27+
"brick/math": "^0.11|^0.12|^0.13|^0.14",
2828
"doctrine/inflector": "^2.0.5",
2929
"dragonmantank/cron-expression": "^3.4",
3030
"egulias/email-validator": "^3.2.1|^4.0",
@@ -40,6 +40,7 @@
4040
"monolog/monolog": "^3.0",
4141
"nesbot/carbon": "^3.8.4",
4242
"nunomaduro/termwind": "^2.0",
43+
"phiki/phiki": "v2.0.0",
4344
"psr/container": "^1.1.1|^2.0.1",
4445
"psr/log": "^1.0|^2.0|^3.0",
4546
"psr/simple-cache": "^1.0|^2.0|^3.0",
@@ -51,7 +52,9 @@
5152
"symfony/http-kernel": "^7.2.0",
5253
"symfony/mailer": "^7.2.0",
5354
"symfony/mime": "^7.2.0",
54-
"symfony/polyfill-php83": "^1.31",
55+
"symfony/polyfill-php83": "^1.33",
56+
"symfony/polyfill-php84": "^1.33",
57+
"symfony/polyfill-php85": "^1.33",
5558
"symfony/process": "^7.2.0",
5659
"symfony/routing": "^7.2.0",
5760
"symfony/uid": "^7.2.0",
@@ -79,6 +82,7 @@
7982
"illuminate/filesystem": "self.version",
8083
"illuminate/hashing": "self.version",
8184
"illuminate/http": "self.version",
85+
"illuminate/json-schema": "self.version",
8286
"illuminate/log": "self.version",
8387
"illuminate/macroable": "self.version",
8488
"illuminate/mail": "self.version",
@@ -111,7 +115,8 @@
111115
"league/flysystem-read-only": "^3.25.1",
112116
"league/flysystem-sftp-v3": "^3.25.1",
113117
"mockery/mockery": "^1.6.10",
114-
"orchestra/testbench-core": "^10.0.0",
118+
"opis/json-schema": "^2.4.1",
119+
"orchestra/testbench-core": "^10.6.5",
115120
"pda/pheanstalk": "^5.0.6|^7.0.0",
116121
"php-http/discovery": "^1.15",
117122
"phpstan/phpstan": "^2.0",
@@ -177,7 +182,7 @@
177182
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
178183
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).",
179184
"brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).",
180-
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
185+
"fakerphp/faker": "Required to generate fake data using the fake() helper (^1.23).",
181186
"filp/whoops": "Required for friendly error pages in development (^2.14.3).",
182187
"laravel/tinker": "Required to use the tinker console command (^2.0).",
183188
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).",

config/cache.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
'serialize' => false,
3939
],
4040

41+
'session' => [
42+
'driver' => 'session',
43+
'key' => env('SESSION_CACHE_KEY', '_cache'),
44+
],
45+
4146
'database' => [
4247
'driver' => 'database',
4348
'connection' => env('DB_CACHE_CONNECTION'),

config/database.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
'busy_timeout' => null,
4242
'journal_mode' => null,
4343
'synchronous' => null,
44+
'transaction_mode' => 'DEFERRED',
45+
'pragmas' => [],
4446
],
4547

4648
'mysql' => [
@@ -159,6 +161,10 @@
159161
'password' => env('REDIS_PASSWORD'),
160162
'port' => env('REDIS_PORT', '6379'),
161163
'database' => env('REDIS_DB', '0'),
164+
'max_retries' => env('REDIS_MAX_RETRIES', 3),
165+
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
166+
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
167+
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
162168
],
163169

164170
'cache' => [
@@ -168,6 +174,10 @@
168174
'password' => env('REDIS_PASSWORD'),
169175
'port' => env('REDIS_PORT', '6379'),
170176
'database' => env('REDIS_CACHE_DB', '1'),
177+
'max_retries' => env('REDIS_MAX_RETRIES', 3),
178+
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
179+
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
180+
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
171181
],
172182

173183
],

src/Illuminate/Auth/Access/Gate.php

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818

1919
use function Illuminate\Support\enum_value;
2020

21-
/**
22-
* @template TClass of object
23-
*/
2421
class Gate implements GateContract
2522
{
2623
use HandlesAuthorization;
@@ -189,7 +186,7 @@ protected function authorizeOnDemand($condition, $message, $code, $allowWhenResp
189186
$response = $condition;
190187
}
191188

192-
return with($response instanceof Response ? $response : new Response(
189+
return ($response instanceof Response ? $response : new Response(
193190
(bool) $response === $allowWhenResponseIs, $message, $code
194191
))->authorize();
195192
}
@@ -329,7 +326,7 @@ public function after(callable $callback)
329326
* Determine if all of the given abilities should be granted for the current user.
330327
*
331328
* @param iterable|\UnitEnum|string $ability
332-
* @param array{class-string<TClass>|TClass, ...} $arguments
329+
* @param mixed $arguments
333330
* @return bool
334331
*/
335332
public function allows($ability, $arguments = [])
@@ -341,7 +338,7 @@ public function allows($ability, $arguments = [])
341338
* Determine if any of the given abilities should be denied for the current user.
342339
*
343340
* @param iterable|\UnitEnum|string $ability
344-
* @param array{class-string<TClass>|TClass, ...} $arguments
341+
* @param mixed $arguments
345342
* @return bool
346343
*/
347344
public function denies($ability, $arguments = [])
@@ -353,7 +350,7 @@ public function denies($ability, $arguments = [])
353350
* Determine if all of the given abilities should be granted for the current user.
354351
*
355352
* @param iterable|\UnitEnum|string $abilities
356-
* @param array{class-string<TClass>|TClass, ...} $arguments
353+
* @param mixed $arguments
357354
* @return bool
358355
*/
359356
public function check($abilities, $arguments = [])
@@ -367,7 +364,7 @@ public function check($abilities, $arguments = [])
367364
* Determine if any one of the given abilities should be granted for the current user.
368365
*
369366
* @param iterable|\UnitEnum|string $abilities
370-
* @param array{class-string<TClass>|TClass, ...} $arguments
367+
* @param mixed $arguments
371368
* @return bool
372369
*/
373370
public function any($abilities, $arguments = [])
@@ -379,7 +376,7 @@ public function any($abilities, $arguments = [])
379376
* Determine if all of the given abilities should be denied for the current user.
380377
*
381378
* @param iterable|\UnitEnum|string $abilities
382-
* @param array{class-string<TClass>|TClass, ...} $arguments
379+
* @param mixed $arguments
383380
* @return bool
384381
*/
385382
public function none($abilities, $arguments = [])
@@ -391,7 +388,7 @@ public function none($abilities, $arguments = [])
391388
* Determine if the given ability should be granted for the current user.
392389
*
393390
* @param \UnitEnum|string $ability
394-
* @param array{class-string<TClass>|TClass, ...} $arguments
391+
* @param mixed $arguments
395392
* @return \Illuminate\Auth\Access\Response
396393
*
397394
* @throws \Illuminate\Auth\Access\AuthorizationException
@@ -405,7 +402,7 @@ public function authorize($ability, $arguments = [])
405402
* Inspect the user for the given ability.
406403
*
407404
* @param \UnitEnum|string $ability
408-
* @param array{class-string<TClass>|TClass, ...} $arguments
405+
* @param mixed $arguments
409406
* @return \Illuminate\Auth\Access\Response
410407
*/
411408
public function inspect($ability, $arguments = [])
@@ -429,7 +426,7 @@ public function inspect($ability, $arguments = [])
429426
* Get the raw result from the authorization callback.
430427
*
431428
* @param string $ability
432-
* @param array{class-string<TClass>|TClass, ...} $arguments
429+
* @param mixed $arguments
433430
* @return mixed
434431
*
435432
* @throws \Illuminate\Auth\Access\AuthorizationException

0 commit comments

Comments
 (0)