Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Messenger] Add--class-filter
option to themessenger:failed:remove
command#59978
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
[Messenger] Add--class-filter
option to themessenger:failed:remove
command#59978
Uh oh!
There was an error while loading.Please reload this page.
Conversation
15bd310
to8557685
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good 👍
class-filter sounds to much technical to me. What about message-filter ? |
src/Symfony/Component/Messenger/Command/FailedMessagesRemoveCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
chalasr commentedMar 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@OskarStark |
be6573e
tofae8ce5
Comparethrow new RuntimeException('No failed messages were found with this filter.'); | ||
} | ||
if (!$io->confirm(\sprintf('There is %d message%s to remove. Do you want to continue?', $idsCount, $idsCount > 1 ? 's' : ''))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
To avoid usingis
orare
depending on the number of messages, let's rewrite it to something like:
if (!$io->confirm(\sprintf('There is %d message%s to remove. Doyou want tocontinue?',$idsCount,$idsCount>1?'s' :''))) { | |
if (!$io->confirm(\sprintf('Can you confirmyou want toremove %d message%s?',$idsCount,1 ===$idsCount ?'' :'s'))) { |
fae8ce5
to1924719
CompareThank you@arnaud-deabreu. |
322995c
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
This PR was merged into the 7.3 branch.Discussion----------[Messenger] fix test| Q | A| ------------- | ---| Branch? | 7.3| Bug fix? | no| New feature? | no| Deprecations? | no| Issues | related to#59978 (comment)| License | MITCommits-------0ec778b fix test
…ger:failed:remove` command (arnaud-deabreu)This PR was squashed before being merged into the 7.3 branch.Discussion----------[Messenger] Add `--class-filter` option to the `messenger:failed:remove` command| Q | A| ------------- | ---| Feature PR |symfony/symfony#59978| PR author(s) | `@arnaud`-deabreu| Merged in | 7.3| Doc issue |Fix#20805The `--class-filter` was added in the `messenger:failed:remove` command in this [PR](symfony/symfony#59978).As the option already exists in the `messenger:failed:show` I'm wondering if only adding this example could be enough ?Commits-------bdca4e9 [Messenger] Add `--class-filter` option to the `messenger:failed:remove` command
This PR adds the
--class-filter
to themessenger:failed:remove
command which is already available onmessenger:failed:show
command.It will yield the message ids that match the given class and use it as if it were passed as the
id
argument in the command so the--force
and--show-messages
can work with this filter.When using the filter, the command will prompt for confirmation before removing the messages.
Example output: