Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/11.x' into on-queue
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmastech committed Jan 25, 2025
2 parents 1e320eb + ebd115f commit c17a871
Show file tree
Hide file tree
Showing 135 changed files with 2,760 additions and 849 deletions.
52 changes: 51 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,56 @@
# Release Notes for 11.x

## [Unreleased](https://github.com/laravel/framework/compare/v11.38.2...11.x)
## [Unreleased](https://github.com/laravel/framework/compare/v11.40.0...11.x)

## [v11.40.0](https://github.com/laravel/framework/compare/v11.39.1...v11.40.0) - 2025-01-24

* 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
* [11.x] Add Laravel Pint by [@browner12](https://github.com/browner12) in https://github.com/laravel/framework/pull/53835
* 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
* [11.x] Add pending attributes by [@tontonsb](https://github.com/tontonsb) in https://github.com/laravel/framework/pull/53720
* fix: `schedule:test` on commands using runInBackground by [@dallyger](https://github.com/dallyger) in https://github.com/laravel/framework/pull/54321
* [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
* Add support for cursor editor in ResolvesDumpSource by [@tuxfamily](https://github.com/tuxfamily) in https://github.com/laravel/framework/pull/54318
* [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
* [11.x] start syncing StyleCI rules to Pint by [@browner12](https://github.com/browner12) in https://github.com/laravel/framework/pull/54326
* [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
* fix(Collection::pop()): count < 1 by [@artumi-richard](https://github.com/artumi-richard) in https://github.com/laravel/framework/pull/54340
* Patch CVE-2025-22145 in nesbot/carbon package by [@dennis-koster](https://github.com/dennis-koster) in https://github.com/laravel/framework/pull/54335
* [11.x] Prevent unintended serialization and compression by [@JeppeKnockaert](https://github.com/JeppeKnockaert) in https://github.com/laravel/framework/pull/54337
* [11.x] Pass collection of models to `whereMorphedTo` / `whereNotMorphedTo` by [@gdebrauwer](https://github.com/gdebrauwer) in https://github.com/laravel/framework/pull/54324

## [v11.39.1](https://github.com/laravel/framework/compare/v11.39.0...v11.39.1) - 2025-01-22

* fix: collapseWithKeys on empty collection by [@benatoff](https://github.com/benatoff) in https://github.com/laravel/framework/pull/54290
* 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
* [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
* [11.x] Add IncrementOrCreate method to Eloquent by [@carloeusebi](https://github.com/carloeusebi) in https://github.com/laravel/framework/pull/54300
* [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
* 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
* [11.x] Fix unique jobs that have a uniqueVia method by [@DougSisk](https://github.com/DougSisk) in https://github.com/laravel/framework/pull/54294

## [v11.39.0](https://github.com/laravel/framework/compare/v11.38.2...v11.39.0) - 2025-01-21

* [11.x] Replace duplicate `ValidatedInput` functions with `InteractsWithData` trait by [@stevebauman](https://github.com/stevebauman) in https://github.com/laravel/framework/pull/54208
* [11.x] Improve `Email` validation rule custom translation messages by [@SanderMuller](https://github.com/SanderMuller) in https://github.com/laravel/framework/pull/54202
* [11.x] Fix deprecation warnings in `optimize:clear` and `optimize` by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/54197
* [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
* Introduces UseFactory attribute by [@christopherarter](https://github.com/christopherarter) in https://github.com/laravel/framework/pull/54065
* [11.x] Set class-string generic on `UseFactory` by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/54215
* [11.x] switch LazyCollection::make() for new LazyCollection() by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/54216
* support style file name hashes with query strings in manifest by [@newapx](https://github.com/newapx) in https://github.com/laravel/framework/pull/54219
* [11.x] Solidify `Rule::email()` tests by [@SanderMuller](https://github.com/SanderMuller) in https://github.com/laravel/framework/pull/54226
* [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
* Add a report/log option to filesystem exceptions without throwing by [@lotharthesavior](https://github.com/lotharthesavior) in https://github.com/laravel/framework/pull/54212
* [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
* [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
* [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
* [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
* [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
* [11.x] Fix line-ending mismatch on Windows test by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/54236
* Added support in DB::prohibitDestructiveCommands to preventing destructive Rollback… by [@hexathos](https://github.com/hexathos) in https://github.com/laravel/framework/pull/54238
* [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
* [11.x] `addPath()` Allow adding new path for translation loader. by [@selcukcukur](https://github.com/selcukcukur) in https://github.com/laravel/framework/pull/54277

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

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"league/flysystem-local": "^3.25.1",
"league/uri": "^7.5.1",
"monolog/monolog": "^3.0",
"nesbot/carbon": "^2.72.2|^3.4",
"nesbot/carbon": "^2.72.6|^3.8.4",
"nunomaduro/termwind": "^2.0",
"psr/container": "^1.1.1|^2.0.1",
"psr/log": "^1.0|^2.0|^3.0",
Expand Down Expand Up @@ -104,6 +104,7 @@
"fakerphp/faker": "^1.24",
"guzzlehttp/promises": "^2.0.3",
"guzzlehttp/psr7": "^2.4",
"laravel/pint": "^1.18",
"league/flysystem-aws-s3-v3": "^3.25.1",
"league/flysystem-ftp": "^3.25.1",
"league/flysystem-path-prefixing": "^3.25.1",
Expand Down
211 changes: 211 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
{
"preset": "empty",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": {
"syntax": "short"
},
"binary_operator_spaces": {
"default": "single_space"
},
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"blank_line_before_statement": {
"statements": [
"return"
]
},
"blank_line_between_import_groups": true,
"blank_lines_before_namespace": true,
"braces_position": {
"control_structures_opening_brace": "same_line",
"functions_opening_brace": "next_line_unless_newline_at_signature_end",
"anonymous_functions_opening_brace": "same_line",
"classes_opening_brace": "next_line_unless_newline_at_signature_end",
"anonymous_classes_opening_brace": "next_line_unless_newline_at_signature_end",
"allow_single_line_empty_anonymous_classes": false,
"allow_single_line_anonymous_functions": false
},
"cast_spaces": true,
"class_definition": true,
"class_reference_name_casing": true,
"clean_namespace": true,
"compact_nullable_type_declaration": true,
"concat_space": true,
"constant_case": {
"case": "lower"
},
"control_structure_braces": true,
"declare_equal_normalize": true,
"elseif": true,
"encoding": true,
"full_opening_tag": true,
"function_declaration": true,
"heredoc_to_nowdoc": true,
"include": true,
"increment_style": {
"style": "post"
},
"indentation_type": true,
"integer_literal_case": true,
"lambda_not_used_import": true,
"line_ending": true,
"list_syntax": {
"syntax": "short"
},
"lowercase_cast": true,
"lowercase_keywords": true,
"lowercase_static_reference": true,
"magic_constant_casing": true,
"magic_method_casing": true,
"method_argument_space": {
"on_multiline": "ignore"
},
"method_chaining_indentation": true,
"multiline_whitespace_before_semicolons": {
"strategy": "no_multi_line"
},
"native_function_casing": true,
"native_type_declaration_casing": true,
"no_alternative_syntax": true,
"no_binary_string": true,
"no_blank_lines_after_class_opening": true,
"no_blank_lines_after_phpdoc": true,
"no_closing_tag": true,
"no_empty_phpdoc": true,
"no_empty_statement": true,
"no_extra_blank_lines": {
"tokens": [
"extra",
"throw",
"use"
]
},
"no_leading_import_slash": true,
"no_leading_namespace_whitespace": true,
"no_mixed_echo_print": {
"use": "echo"
},
"no_multiline_whitespace_around_double_arrow": true,
"no_short_bool_cast": true,
"no_singleline_whitespace_before_semicolons": true,
"no_space_around_double_colon": true,
"no_spaces_around_offset": {
"positions": [
"inside",
"outside"
]
},
"no_spaces_after_function_name": true,
"no_trailing_comma_in_singleline": true,
"no_trailing_whitespace": true,
"no_trailing_whitespace_in_comment": true,
"no_unneeded_braces": true,
"no_unneeded_control_parentheses": true,
"no_unneeded_import_alias": true,
"no_unset_cast": true,
"no_unused_imports": true,
"no_useless_return": true,
"no_whitespace_before_comma_in_array": true,
"no_whitespace_in_blank_line": true,
"normalize_index_brace": true,
"not_operator_with_successor_space": true,
"nullable_type_declaration_for_default_null_value": true,
"object_operator_without_whitespace": true,
"ordered_imports": {
"sort_algorithm": "alpha",
"imports_order": [
"const",
"class",
"function"
]
},
"phpdoc_align": {
"align": "left",
"spacing": {
"param": 2
}
},
"phpdoc_indent": true,
"phpdoc_inline_tag_normalizer": true,
"phpdoc_no_access": true,
"phpdoc_no_package": true,
"phpdoc_no_useless_inheritdoc": true,
"phpdoc_order": {
"order": [
"param",
"return",
"throws"
]
},
"phpdoc_return_self_reference": true,
"phpdoc_scalar": true,
"phpdoc_separation": {
"groups": [
[
"deprecated",
"link",
"see",
"since"
],
[
"author",
"copyright",
"license"
],
[
"category",
"package",
"subpackage"
],
[
"property",
"property-read",
"property-write"
],
[
"param",
"return"
]
]
},
"phpdoc_single_line_var_spacing": true,
"phpdoc_summary": true,
"phpdoc_trim": true,
"phpdoc_types": true,
"phpdoc_var_without_name": true,
"return_type_declaration": {
"space_before": "none"
},
"short_scalar_cast": true,
"single_blank_line_at_eof": true,
"single_class_element_per_statement": true,
"single_import_per_statement": true,
"single_line_after_imports": true,
"single_line_comment_style": true,
"single_quote": true,
"space_after_semicolon": true,
"spaces_inside_parentheses": true,
"standardize_not_equals": true,
"switch_case_semicolon_to_colon": true,
"switch_case_space": true,
"switch_continue_to_break": true,
"ternary_operator_spaces": true,
"trailing_comma_in_multiline": true,
"trim_array_spaces": true,
"type_declaration_spaces": true,
"types_spaces": true,
"unary_operator_spaces": true,
"visibility_required": {
"elements": [
"method",
"property"
]
},
"whitespace_after_comma_in_array": true
},
"notPath": [
"tests/Foundation/fixtures/bad-syntax-strategy.php"
]
}
4 changes: 2 additions & 2 deletions src/Illuminate/Auth/DatabaseUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public function retrieveByToken($identifier, #[\SensitiveParameter] $token)
public function updateRememberToken(UserContract $user, #[\SensitiveParameter] $token)
{
$this->connection->table($this->table)
->where($user->getAuthIdentifierName(), $user->getAuthIdentifier())
->update([$user->getRememberTokenName() => $token]);
->where($user->getAuthIdentifierName(), $user->getAuthIdentifier())
->update([$user->getRememberTokenName() => $token]);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Auth/EloquentUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public function retrieveById($identifier)
$model = $this->createModel();

return $this->newModelQuery($model)
->where($model->getAuthIdentifierName(), $identifier)
->first();
->where($model->getAuthIdentifierName(), $identifier)
->first();
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ protected function retrieveChannelOptions($channel)
*/
protected function channelNameMatchesPattern($channel, $pattern)
{
$pattern = str_replace('.', '\.', $pattern);

return preg_match('/^'.preg_replace('/\{(.*?)\}/', '([^\.]+)', $pattern).'$/', $channel);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function decodePusherResponse($request, $response)
}

return response()->json(json_decode($response, true))
->withCallback($request->callback);
->withCallback($request->callback);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Bus/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ public function add($jobs)

return with($this->prepareBatchedChain($job), function ($chain) {
return $chain->first()
->allOnQueue($this->options['queue'] ?? null)
->allOnConnection($this->options['connection'] ?? null)
->chain($chain->slice(1)->values()->all());
->allOnQueue($this->options['queue'] ?? null)
->allOnConnection($this->options['connection'] ?? null)
->chain($chain->slice(1)->values()->all());
});
} else {
$job->withBatchId($this->id);
Expand Down
26 changes: 13 additions & 13 deletions src/Illuminate/Bus/DatabaseBatchRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ public function __construct(BatchFactory $factory, Connection $connection, strin
public function get($limit = 50, $before = null)
{
return $this->connection->table($this->table)
->orderByDesc('id')
->take($limit)
->when($before, fn ($q) => $q->where('id', '<', $before))
->get()
->map(function ($batch) {
return $this->toBatch($batch);
})
->all();
->orderByDesc('id')
->take($limit)
->when($before, fn ($q) => $q->where('id', '<', $before))
->get()
->map(function ($batch) {
return $this->toBatch($batch);
})
->all();
}

/**
Expand All @@ -77,9 +77,9 @@ public function get($limit = 50, $before = null)
public function find(string $batchId)
{
$batch = $this->connection->table($this->table)
->useWritePdo()
->where('id', $batchId)
->first();
->useWritePdo()
->where('id', $batchId)
->first();

if ($batch) {
return $this->toBatch($batch);
Expand Down Expand Up @@ -185,8 +185,8 @@ protected function updateAtomicValues(string $batchId, Closure $callback)
{
return $this->connection->transaction(function () use ($batchId, $callback) {
$batch = $this->connection->table($this->table)->where('id', $batchId)
->lockForUpdate()
->first();
->lockForUpdate()
->first();

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

0 comments on commit c17a871

Please sign in to comment.