Skip to content

Conversation

@TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Feb 28, 2025

By default, Symfony Console requires explicit command name, if args/options are passed.

That's not very practical, because 99.99 % cases we want to run the process command. E.g. for unit tests, we can run PHPUnit like:

vendor/bin/phpunit
vendor/bin/phpunit path/to/test

No extra vendor/bin/phpunit test path/to/test is needed.


If it's not provided explicitly, and no other command is used, the process command should be run automatically.

image

@TomasVotruba TomasVotruba force-pushed the tv-dx-rules branch 2 times, most recently from c39b19a to a21013e Compare February 28, 2025 13:09
@TomasVotruba TomasVotruba changed the title tv dx rules [dx] Prepend command name automatically if only paths are passed Feb 28, 2025
@TomasVotruba TomasVotruba force-pushed the tv-dx-rules branch 2 times, most recently from 26a2cc6 to 3a2f498 Compare February 28, 2025 13:16
@staabm
Copy link
Contributor

staabm commented Mar 1, 2025

Can this sf console native feature be used instead?

https://symfony.com/doc/current/components/console/single_command_tool.html

@TomasVotruba
Copy link
Member Author

@staabm We already use that, but it only work with explicit command name, if there are extra args/options.
This PR is trying to fix it.

@TomasVotruba
Copy link
Member Author

Let's test this in a wild 🦁

@TomasVotruba TomasVotruba enabled auto-merge (squash) April 3, 2025 08:14
@TomasVotruba TomasVotruba merged commit 42c924a into main Apr 3, 2025
45 checks passed
@TomasVotruba TomasVotruba deleted the tv-dx-rules branch April 3, 2025 08:15
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants