Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Deprecate returning a non-int value from a\Closure function set viaCommand::setCode()#60076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:7.3fromyceruto:command_return_type
Mar 29, 2025

Conversation

yceruto
Copy link
Member

QA
Branch?7.3
Bug fix?no
New feature?no
Deprecations?yes
Issues-
LicenseMIT

This adds a missing log entry about a deprecation introducedhere, and also deprecates returning anull value for\Closure code (which was allowed before) and throwing a\TypeError for the new invokable command, making this consistent with theCommand::execute(): int method.

matyo91 reacted with rocket emoji
@carsonbotcarsonbot added this to the7.3 milestoneMar 28, 2025
@ycerutoyceruto changed the titleDeprecate returning a non-int value from a\Closure function set viaCommand::setCode()[Console] Deprecate returning a non-int value from a\Closure function set viaCommand::setCode()Mar 28, 2025
@ycerutoycerutoforce-pushed thecommand_return_type branch 2 times, most recently fromcedfb80 toafc81afCompareMarch 28, 2025 13:53
@carsonbotcarsonbot changed the title[Console] Deprecate returning a non-int value from a\Closure function set viaCommand::setCode()Deprecate returning a non-int value from a\Closure function set viaCommand::setCode()Mar 28, 2025
@carsonbotcarsonbot changed the titleDeprecate returning a non-int value from a\Closure function set viaCommand::setCode()[Console] Deprecate returning a non-int value from a\Closure function set viaCommand::setCode()Mar 28, 2025
@fabpot
Copy link
Member

Thank you@yceruto.

@fabpotfabpot merged commitf6b63a2 intosymfony:7.3Mar 29, 2025
11 checks passed
@ycerutoyceruto deleted the command_return_type branchMarch 29, 2025 13:34
@fabpotfabpot mentioned this pull requestMay 2, 2025
xabbuh added a commit to xabbuh/symfony that referenced this pull requestMay 7, 2025
Sincesymfony#60076 using a closure as the command code that does not return aninteger is deprecated. This means that our tests can trigger deprecationson older branches when the high deps job is run. This usually is not anissue as we silence them with the `SYMFONY_DEPRECATIONS_HELPER` env var.However, phpt tests are run in a child process where the deprecation errorhandler of the PHPUnit bridge doesn't step in. Thus, for them deprecationsare not silenced leading to failures.
@xabbuhxabbuh mentioned this pull requestMay 7, 2025
xabbuh added a commit to xabbuh/symfony that referenced this pull requestMay 7, 2025
Sincesymfony#60076 using a closure as the command code that does not return aninteger is deprecated. This means that our tests can trigger deprecationson older branches when the high deps job is run. This usually is not anissue as we silence them with the `SYMFONY_DEPRECATIONS_HELPER` env var.However, phpt tests are run in a child process where the deprecation errorhandler of the PHPUnit bridge doesn't step in. Thus, for them deprecationsare not silenced leading to failures.
fabpot added a commit that referenced this pull requestMay 8, 2025
This PR was merged into the 6.4 branch.Discussion----------[Runtime] fix tests| Q             | A| ------------- | ---| Branch?       | 6.4| Bug fix?      | no| New feature?  | no| Deprecations? | no| Issues        || License       | MITSince#60076 using a closure as the command code that does not return an integer is deprecated. This means that our tests can trigger deprecations on older branches when the high deps job is run. This usually is not an issue as we silence them with the `SYMFONY_DEPRECATIONS_HELPER` env var. However, phpt tests are run in a child process where the deprecation error handler of the PHPUnit bridge doesn't step in. Thus, for them deprecations are not silenced leading to failures.Commits-------0b3d980 fix tests
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

4 participants
@yceruto@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp