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] Add support for invokable commands inLockableTrait#60024

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:lockable_invokable_command
Mar 24, 2025

Conversation

yceruto
Copy link
Member

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

This enables invokable commands to useLockableTrait without extending theCommand class:

useSymfony\Component\Console\Command\LockableTrait;#[AsCommand(name:'foo:lock')]class FooLockCommand{use LockableTrait;publicfunction__invoke():int    {if (!$this->lock()) {return Command::FAILURE;        }// exclusive logic starts here...$this->release();return Command::SUCCESS;    }}

Ref:https://symfony.com/doc/current/console/lockable_trait.html

GromNaN and javiereguiluz reacted with thumbs up emoji
@fabpotfabpotforce-pushed thelockable_invokable_command branch frome1521dd to5595a32CompareMarch 24, 2025 07:55
@fabpot
Copy link
Member

Thank you@yceruto.

@fabpotfabpot merged commitcf5b2f0 intosymfony:7.3Mar 24, 2025
3 of 4 checks passed
@ycerutoyceruto deleted the lockable_invokable_command branchMarch 24, 2025 11:52
@fabpotfabpot mentioned this pull requestMay 2, 2025
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

@GromNaNGromNaNGromNaN approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

@mtarldmtarldmtarld approved these changes

@chalasrchalasrchalasr approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

8 participants
@yceruto@fabpot@nicolas-grekas@GromNaN@OskarStark@mtarld@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp