Skip to content

Commit c17a871

Browse files
committed
Merge remote-tracking branch 'origin/11.x' into on-queue
2 parents 1e320eb + ebd115f commit c17a871

File tree

135 files changed

+2760
-849
lines changed

Some content is hidden

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

135 files changed

+2760
-849
lines changed

CHANGELOG.md

+51-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,56 @@
11
# Release Notes for 11.x
22

3-
## [Unreleased](https://github.com/laravel/framework/compare/v11.38.2...11.x)
3+
## [Unreleased](https://github.com/laravel/framework/compare/v11.40.0...11.x)
4+
5+
## [v11.40.0](https://github.com/laravel/framework/compare/v11.39.1...v11.40.0) - 2025-01-24
6+
7+
* draft: fix: Don't release lock for ShouldBeUniqueUntilProcessing Job that gets released by [@mathiasgrimm](https://github.com/mathiasgrimm) in https://github.com/laravel/framework/pull/54261
8+
* [11.x] Add Laravel Pint by [@browner12](https://github.com/browner12) in https://github.com/laravel/framework/pull/53835
9+
* Add self to HasCollection type param in Model by [@thena-seer-sfg](https://github.com/thena-seer-sfg) in https://github.com/laravel/framework/pull/54311
10+
* [11.x] Add pending attributes by [@tontonsb](https://github.com/tontonsb) in https://github.com/laravel/framework/pull/53720
11+
* fix: `schedule:test` on commands using runInBackground by [@dallyger](https://github.com/dallyger) in https://github.com/laravel/framework/pull/54321
12+
* [11.x] Helper methods to dump responses of the Laravel HTTP client by [@morrislaptop](https://github.com/morrislaptop) in https://github.com/laravel/framework/pull/54317
13+
* Add support for cursor editor in ResolvesDumpSource by [@tuxfamily](https://github.com/tuxfamily) in https://github.com/laravel/framework/pull/54318
14+
* [11.x] Add Customizable Date Validation Rule with Flexible Date Constraints by [@michaelnabil230](https://github.com/michaelnabil230) in https://github.com/laravel/framework/pull/53465
15+
* [11.x] start syncing StyleCI rules to Pint by [@browner12](https://github.com/browner12) in https://github.com/laravel/framework/pull/54326
16+
* [11.x] apply our new Pint rule to the `/tests` directory by [@browner12](https://github.com/browner12) in https://github.com/laravel/framework/pull/54325
17+
* fix(Collection::pop()): count < 1 by [@artumi-richard](https://github.com/artumi-richard) in https://github.com/laravel/framework/pull/54340
18+
* Patch CVE-2025-22145 in nesbot/carbon package by [@dennis-koster](https://github.com/dennis-koster) in https://github.com/laravel/framework/pull/54335
19+
* [11.x] Prevent unintended serialization and compression by [@JeppeKnockaert](https://github.com/JeppeKnockaert) in https://github.com/laravel/framework/pull/54337
20+
* [11.x] Pass collection of models to `whereMorphedTo` / `whereNotMorphedTo` by [@gdebrauwer](https://github.com/gdebrauwer) in https://github.com/laravel/framework/pull/54324
21+
22+
## [v11.39.1](https://github.com/laravel/framework/compare/v11.39.0...v11.39.1) - 2025-01-22
23+
24+
* fix: collapseWithKeys on empty collection by [@benatoff](https://github.com/benatoff) in https://github.com/laravel/framework/pull/54290
25+
* fix(broadcaster): incorrect channel matching because of dot in pattern by [@021-projects](https://github.com/021-projects) in https://github.com/laravel/framework/pull/54303
26+
* [11.x] Use constructor property promotion for database query condition expression by [@shaedrich](https://github.com/shaedrich) in https://github.com/laravel/framework/pull/54302
27+
* [11.x] Add IncrementOrCreate method to Eloquent by [@carloeusebi](https://github.com/carloeusebi) in https://github.com/laravel/framework/pull/54300
28+
* [11.x] Add additional test cases for Arr helper to enhance coverage by [@mrvipchien](https://github.com/mrvipchien) in https://github.com/laravel/framework/pull/54298
29+
* Bump vite from 5.2.14 to 5.4.12 in /src/Illuminate/Foundation/resources/exceptions/renderer by [@dependabot](https://github.com/dependabot) in https://github.com/laravel/framework/pull/54296
30+
* [11.x] Fix unique jobs that have a uniqueVia method by [@DougSisk](https://github.com/DougSisk) in https://github.com/laravel/framework/pull/54294
31+
32+
## [v11.39.0](https://github.com/laravel/framework/compare/v11.38.2...v11.39.0) - 2025-01-21
33+
34+
* [11.x] Replace duplicate `ValidatedInput` functions with `InteractsWithData` trait by [@stevebauman](https://github.com/stevebauman) in https://github.com/laravel/framework/pull/54208
35+
* [11.x] Improve `Email` validation rule custom translation messages by [@SanderMuller](https://github.com/SanderMuller) in https://github.com/laravel/framework/pull/54202
36+
* [11.x] Fix deprecation warnings in `optimize:clear` and `optimize` by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/54197
37+
* [11.x] Add support for phpredis backoff and max retry config options by [@TheLevti](https://github.com/TheLevti) in https://github.com/laravel/framework/pull/54191
38+
* Introduces UseFactory attribute by [@christopherarter](https://github.com/christopherarter) in https://github.com/laravel/framework/pull/54065
39+
* [11.x] Set class-string generic on `UseFactory` by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/54215
40+
* [11.x] switch LazyCollection::make() for new LazyCollection() by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/54216
41+
* support style file name hashes with query strings in manifest by [@newapx](https://github.com/newapx) in https://github.com/laravel/framework/pull/54219
42+
* [11.x] Solidify `Rule::email()` tests by [@SanderMuller](https://github.com/SanderMuller) in https://github.com/laravel/framework/pull/54226
43+
* [11.x] Fix line-ending mismatch in CliDumperTest::testArray and CliDumperTest::testObject by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/54222
44+
* Add a report/log option to filesystem exceptions without throwing by [@lotharthesavior](https://github.com/lotharthesavior) in https://github.com/laravel/framework/pull/54212
45+
* [11.x] Fix Cache component to be aware of phpredis serialization and compression settings by [@TheLevti](https://github.com/TheLevti) in https://github.com/laravel/framework/pull/54221
46+
* [11.x] fix: Forcing DB Session driver to always use the write connection by [@mathiasgrimm](https://github.com/mathiasgrimm) in https://github.com/laravel/framework/pull/54231
47+
* [11.x] Fix line-ending mismatch in `BladeComponentTagCompilerTest` under `Illuminate\Tests\View\Blade` by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/54233
48+
* [11.x] Fix job not logged in failed_jobs table if timeout occurs within database transaction by [@decaylala](https://github.com/decaylala) in https://github.com/laravel/framework/pull/54173
49+
* [11.x] Fix unique job lock is not released on model not found exception, lock gets stuck. by [@zackAJ](https://github.com/zackAJ) in https://github.com/laravel/framework/pull/54000
50+
* [11.x] Fix line-ending mismatch on Windows test by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/54236
51+
* Added support in DB::prohibitDestructiveCommands to preventing destructive Rollback… by [@hexathos](https://github.com/hexathos) in https://github.com/laravel/framework/pull/54238
52+
* [11.x] Add applyAfterQueryCallbacks Support to Non-Mutator Cases in pluck Method by [@batinmustu](https://github.com/batinmustu) in https://github.com/laravel/framework/pull/54268
53+
* [11.x] `addPath()` Allow adding new path for translation loader. by [@selcukcukur](https://github.com/selcukcukur) in https://github.com/laravel/framework/pull/54277
454

555
## [v11.38.2](https://github.com/laravel/framework/compare/v11.38.1...v11.38.2) - 2025-01-15
656

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"league/flysystem-local": "^3.25.1",
3939
"league/uri": "^7.5.1",
4040
"monolog/monolog": "^3.0",
41-
"nesbot/carbon": "^2.72.2|^3.4",
41+
"nesbot/carbon": "^2.72.6|^3.8.4",
4242
"nunomaduro/termwind": "^2.0",
4343
"psr/container": "^1.1.1|^2.0.1",
4444
"psr/log": "^1.0|^2.0|^3.0",
@@ -104,6 +104,7 @@
104104
"fakerphp/faker": "^1.24",
105105
"guzzlehttp/promises": "^2.0.3",
106106
"guzzlehttp/psr7": "^2.4",
107+
"laravel/pint": "^1.18",
107108
"league/flysystem-aws-s3-v3": "^3.25.1",
108109
"league/flysystem-ftp": "^3.25.1",
109110
"league/flysystem-path-prefixing": "^3.25.1",

pint.json

+211
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
{
2+
"preset": "empty",
3+
"rules": {
4+
"align_multiline_comment": true,
5+
"array_indentation": true,
6+
"array_syntax": {
7+
"syntax": "short"
8+
},
9+
"binary_operator_spaces": {
10+
"default": "single_space"
11+
},
12+
"blank_line_after_namespace": true,
13+
"blank_line_after_opening_tag": true,
14+
"blank_line_before_statement": {
15+
"statements": [
16+
"return"
17+
]
18+
},
19+
"blank_line_between_import_groups": true,
20+
"blank_lines_before_namespace": true,
21+
"braces_position": {
22+
"control_structures_opening_brace": "same_line",
23+
"functions_opening_brace": "next_line_unless_newline_at_signature_end",
24+
"anonymous_functions_opening_brace": "same_line",
25+
"classes_opening_brace": "next_line_unless_newline_at_signature_end",
26+
"anonymous_classes_opening_brace": "next_line_unless_newline_at_signature_end",
27+
"allow_single_line_empty_anonymous_classes": false,
28+
"allow_single_line_anonymous_functions": false
29+
},
30+
"cast_spaces": true,
31+
"class_definition": true,
32+
"class_reference_name_casing": true,
33+
"clean_namespace": true,
34+
"compact_nullable_type_declaration": true,
35+
"concat_space": true,
36+
"constant_case": {
37+
"case": "lower"
38+
},
39+
"control_structure_braces": true,
40+
"declare_equal_normalize": true,
41+
"elseif": true,
42+
"encoding": true,
43+
"full_opening_tag": true,
44+
"function_declaration": true,
45+
"heredoc_to_nowdoc": true,
46+
"include": true,
47+
"increment_style": {
48+
"style": "post"
49+
},
50+
"indentation_type": true,
51+
"integer_literal_case": true,
52+
"lambda_not_used_import": true,
53+
"line_ending": true,
54+
"list_syntax": {
55+
"syntax": "short"
56+
},
57+
"lowercase_cast": true,
58+
"lowercase_keywords": true,
59+
"lowercase_static_reference": true,
60+
"magic_constant_casing": true,
61+
"magic_method_casing": true,
62+
"method_argument_space": {
63+
"on_multiline": "ignore"
64+
},
65+
"method_chaining_indentation": true,
66+
"multiline_whitespace_before_semicolons": {
67+
"strategy": "no_multi_line"
68+
},
69+
"native_function_casing": true,
70+
"native_type_declaration_casing": true,
71+
"no_alternative_syntax": true,
72+
"no_binary_string": true,
73+
"no_blank_lines_after_class_opening": true,
74+
"no_blank_lines_after_phpdoc": true,
75+
"no_closing_tag": true,
76+
"no_empty_phpdoc": true,
77+
"no_empty_statement": true,
78+
"no_extra_blank_lines": {
79+
"tokens": [
80+
"extra",
81+
"throw",
82+
"use"
83+
]
84+
},
85+
"no_leading_import_slash": true,
86+
"no_leading_namespace_whitespace": true,
87+
"no_mixed_echo_print": {
88+
"use": "echo"
89+
},
90+
"no_multiline_whitespace_around_double_arrow": true,
91+
"no_short_bool_cast": true,
92+
"no_singleline_whitespace_before_semicolons": true,
93+
"no_space_around_double_colon": true,
94+
"no_spaces_around_offset": {
95+
"positions": [
96+
"inside",
97+
"outside"
98+
]
99+
},
100+
"no_spaces_after_function_name": true,
101+
"no_trailing_comma_in_singleline": true,
102+
"no_trailing_whitespace": true,
103+
"no_trailing_whitespace_in_comment": true,
104+
"no_unneeded_braces": true,
105+
"no_unneeded_control_parentheses": true,
106+
"no_unneeded_import_alias": true,
107+
"no_unset_cast": true,
108+
"no_unused_imports": true,
109+
"no_useless_return": true,
110+
"no_whitespace_before_comma_in_array": true,
111+
"no_whitespace_in_blank_line": true,
112+
"normalize_index_brace": true,
113+
"not_operator_with_successor_space": true,
114+
"nullable_type_declaration_for_default_null_value": true,
115+
"object_operator_without_whitespace": true,
116+
"ordered_imports": {
117+
"sort_algorithm": "alpha",
118+
"imports_order": [
119+
"const",
120+
"class",
121+
"function"
122+
]
123+
},
124+
"phpdoc_align": {
125+
"align": "left",
126+
"spacing": {
127+
"param": 2
128+
}
129+
},
130+
"phpdoc_indent": true,
131+
"phpdoc_inline_tag_normalizer": true,
132+
"phpdoc_no_access": true,
133+
"phpdoc_no_package": true,
134+
"phpdoc_no_useless_inheritdoc": true,
135+
"phpdoc_order": {
136+
"order": [
137+
"param",
138+
"return",
139+
"throws"
140+
]
141+
},
142+
"phpdoc_return_self_reference": true,
143+
"phpdoc_scalar": true,
144+
"phpdoc_separation": {
145+
"groups": [
146+
[
147+
"deprecated",
148+
"link",
149+
"see",
150+
"since"
151+
],
152+
[
153+
"author",
154+
"copyright",
155+
"license"
156+
],
157+
[
158+
"category",
159+
"package",
160+
"subpackage"
161+
],
162+
[
163+
"property",
164+
"property-read",
165+
"property-write"
166+
],
167+
[
168+
"param",
169+
"return"
170+
]
171+
]
172+
},
173+
"phpdoc_single_line_var_spacing": true,
174+
"phpdoc_summary": true,
175+
"phpdoc_trim": true,
176+
"phpdoc_types": true,
177+
"phpdoc_var_without_name": true,
178+
"return_type_declaration": {
179+
"space_before": "none"
180+
},
181+
"short_scalar_cast": true,
182+
"single_blank_line_at_eof": true,
183+
"single_class_element_per_statement": true,
184+
"single_import_per_statement": true,
185+
"single_line_after_imports": true,
186+
"single_line_comment_style": true,
187+
"single_quote": true,
188+
"space_after_semicolon": true,
189+
"spaces_inside_parentheses": true,
190+
"standardize_not_equals": true,
191+
"switch_case_semicolon_to_colon": true,
192+
"switch_case_space": true,
193+
"switch_continue_to_break": true,
194+
"ternary_operator_spaces": true,
195+
"trailing_comma_in_multiline": true,
196+
"trim_array_spaces": true,
197+
"type_declaration_spaces": true,
198+
"types_spaces": true,
199+
"unary_operator_spaces": true,
200+
"visibility_required": {
201+
"elements": [
202+
"method",
203+
"property"
204+
]
205+
},
206+
"whitespace_after_comma_in_array": true
207+
},
208+
"notPath": [
209+
"tests/Foundation/fixtures/bad-syntax-strategy.php"
210+
]
211+
}

src/Illuminate/Auth/DatabaseUserProvider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public function retrieveByToken($identifier, #[\SensitiveParameter] $token)
8787
public function updateRememberToken(UserContract $user, #[\SensitiveParameter] $token)
8888
{
8989
$this->connection->table($this->table)
90-
->where($user->getAuthIdentifierName(), $user->getAuthIdentifier())
91-
->update([$user->getRememberTokenName() => $token]);
90+
->where($user->getAuthIdentifierName(), $user->getAuthIdentifier())
91+
->update([$user->getRememberTokenName() => $token]);
9292
}
9393

9494
/**

src/Illuminate/Auth/EloquentUserProvider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public function retrieveById($identifier)
5555
$model = $this->createModel();
5656

5757
return $this->newModelQuery($model)
58-
->where($model->getAuthIdentifierName(), $identifier)
59-
->first();
58+
->where($model->getAuthIdentifierName(), $identifier)
59+
->first();
6060
}
6161

6262
/**

src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php

+2
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ protected function retrieveChannelOptions($channel)
372372
*/
373373
protected function channelNameMatchesPattern($channel, $pattern)
374374
{
375+
$pattern = str_replace('.', '\.', $pattern);
376+
375377
return preg_match('/^'.preg_replace('/\{(.*?)\}/', '([^\.]+)', $pattern).'$/', $channel);
376378
}
377379

src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ protected function decodePusherResponse($request, $response)
135135
}
136136

137137
return response()->json(json_decode($response, true))
138-
->withCallback($request->callback);
138+
->withCallback($request->callback);
139139
}
140140

141141
/**

src/Illuminate/Bus/Batch.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ public function add($jobs)
171171

172172
return with($this->prepareBatchedChain($job), function ($chain) {
173173
return $chain->first()
174-
->allOnQueue($this->options['queue'] ?? null)
175-
->allOnConnection($this->options['connection'] ?? null)
176-
->chain($chain->slice(1)->values()->all());
174+
->allOnQueue($this->options['queue'] ?? null)
175+
->allOnConnection($this->options['connection'] ?? null)
176+
->chain($chain->slice(1)->values()->all());
177177
});
178178
} else {
179179
$job->withBatchId($this->id);

src/Illuminate/Bus/DatabaseBatchRepository.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ public function __construct(BatchFactory $factory, Connection $connection, strin
5858
public function get($limit = 50, $before = null)
5959
{
6060
return $this->connection->table($this->table)
61-
->orderByDesc('id')
62-
->take($limit)
63-
->when($before, fn ($q) => $q->where('id', '<', $before))
64-
->get()
65-
->map(function ($batch) {
66-
return $this->toBatch($batch);
67-
})
68-
->all();
61+
->orderByDesc('id')
62+
->take($limit)
63+
->when($before, fn ($q) => $q->where('id', '<', $before))
64+
->get()
65+
->map(function ($batch) {
66+
return $this->toBatch($batch);
67+
})
68+
->all();
6969
}
7070

7171
/**
@@ -77,9 +77,9 @@ public function get($limit = 50, $before = null)
7777
public function find(string $batchId)
7878
{
7979
$batch = $this->connection->table($this->table)
80-
->useWritePdo()
81-
->where('id', $batchId)
82-
->first();
80+
->useWritePdo()
81+
->where('id', $batchId)
82+
->first();
8383

8484
if ($batch) {
8585
return $this->toBatch($batch);
@@ -185,8 +185,8 @@ protected function updateAtomicValues(string $batchId, Closure $callback)
185185
{
186186
return $this->connection->transaction(function () use ($batchId, $callback) {
187187
$batch = $this->connection->table($this->table)->where('id', $batchId)
188-
->lockForUpdate()
189-
->first();
188+
->lockForUpdate()
189+
->first();
190190

191191
return is_null($batch) ? [] : tap($callback($batch), function ($values) use ($batchId) {
192192
$this->connection->table($this->table)->where('id', $batchId)->update($values);

0 commit comments

Comments
 (0)