[11.x] backport #56235#56236
Merged
Merged
Conversation
The Symfony Command uses the AsCommand attribute to set properties on the command class. However, the properties are only set if they are identical to an empty string. The Laravel Command class overrides the properties and removes the default value which causes the properties to be null and therefore not set.
Contributor
Author
|
Thank you!! |
taylorotwell
pushed a commit
that referenced
this pull request
Jul 14, 2025
* [11.x] Correct how base options for missing config files are preloaded (#56216) * Formatting * Add breaking test to demo config array has been incorrectly keyed with numbers * Correct how base options for missing config files are preloaded * fix: AsCommand properties not being set on commands (#56236) The Symfony Command uses the AsCommand attribute to set properties on the command class. However, the properties are only set if they are identical to an empty string. The Laravel Command class overrides the properties and removes the default value which causes the properties to be null and therefore not set. --------- Co-authored-by: Caleb White <cdwhite3@pm.me>
mohammad-fouladgar
pushed a commit
to mohammad-fouladgar/framework
that referenced
this pull request
Jul 22, 2025
* [11.x] Correct how base options for missing config files are preloaded (laravel#56216) * Formatting * Add breaking test to demo config array has been incorrectly keyed with numbers * Correct how base options for missing config files are preloaded * fix: AsCommand properties not being set on commands (laravel#56236) The Symfony Command uses the AsCommand attribute to set properties on the command class. However, the properties are only set if they are identical to an empty string. The Laravel Command class overrides the properties and removes the default value which causes the properties to be null and therefore not set. --------- Co-authored-by: Caleb White <cdwhite3@pm.me>
crynobone
added a commit
that referenced
this pull request
Aug 12, 2025
* [11.x] Correct how base options for missing config files are preloaded (#56216) * Formatting * Add breaking test to demo config array has been incorrectly keyed with numbers * Correct how base options for missing config files are preloaded * fix: AsCommand properties not being set on commands (#56236) The Symfony Command uses the AsCommand attribute to set properties on the command class. However, the properties are only set if they are identical to an empty string. The Laravel Command class overrides the properties and removes the default value which causes the properties to be null and therefore not set. * update trust proxy * add trust proxy * [12.x] Consistent use of `mb_split()` to split strings into words (#56338) (#56617) * consistent use of mb_split to split strings into words with multi-byte support * The $pattern argument doesn't use /pattern/ delimiters, unlike other regex functions such as preg_match Co-authored-by: Sebastian Hädrich <11225821+shaedrich@users.noreply.github.com> * fix: CacheSchedulingMutex should use lock connection (#56472) (#56614) Co-authored-by: Julius van Dijk <julius@anaglyphic.com> * Test Improvements - Fix integration with PHPUnit 12.3.4 - Fix PHPStan Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> * Apply fixes from StyleCI * wip Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> * wip Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> * wip Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> * wip Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> --------- Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> Co-authored-by: Jonathan Goode <u01jmg3@users.noreply.github.com> Co-authored-by: Caleb White <cdwhite3@pm.me> Co-authored-by: Taylor Otwell <taylor@laravel.com> Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com> Co-authored-by: Sebastian Hädrich <11225821+shaedrich@users.noreply.github.com> Co-authored-by: Julius van Dijk <julius@anaglyphic.com> Co-authored-by: StyleCI Bot <bot@styleci.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
This backports #56235 to 11.x.
We're getting hundreds of pages of the following logs even though all of our commands use the
AsCommandattribute:This is because the attribute description is not being used to set the command description due to Symfony's
=== ''check on the parent constructor.Thanks!