Skip to content

Conversation

francodacosta
Copy link

For stand alone applications passing a command is mandatory but most of the times not really necessary

So instead of calling my application like this /myapp.php mycommand --my_option I can just write ./myapp.php --my_option

this PR allows for it while allowing to add (and execute) more than one command

You just need to add $app->setDefaultCommandName('command:name'); and if the command is not found the default one will be executed

includes unit tests and does not breack BC

@@ -56,7 +56,7 @@ class Application
private $autoExit;
private $definition;
private $helperSet;

private $defaultCommandName = null;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CS here (and docs)

@stof
Copy link
Member

stof commented Apr 4, 2012

pull requests should be sent to symfony/symfony. The subtree splits are marked as read-only in their description, which means that only the cron job updating them from the symfony repo writes in them.

there is currently a discussion to see if it could be possible to accept pull requests coming both ways but we haven't set up the needed tools yet (or even figured if it can be done reliably)

@francodacosta
Copy link
Author

@stof Thanks for the update

Given Symfony component based structure I was expecting that each component had its own repository that would be merged on Symfony, after all the components are isolated and can be used as stand alone

Maybe you can take this idea to the discussion

I will take the code review suggestions and do a new pull request on symfony/synfony

@stof
Copy link
Member

stof commented Apr 5, 2012

@francodacosta It works the other way. We develop symfony in the main repo and then a cron splits the components to the individual repos. It makes the development easier as we don't need to synchronize PRs among several repos when they impact several components.

We are searching a way to be able to receive PRs both ways (probably by having a tool which moves the work done in the components to the main repo) but it is not done yet

symfony-splitter pushed a commit that referenced this pull request Sep 4, 2018
This PR was merged into the 4.2-dev branch.

Discussion
----------

Mark ExceptionInterfaces throwable #2

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This has been reverted in beta of 4.1 because of lack of support in prophecy, which has been fixed since then (incl. release). Can be merged again.

References:
symfony/symfony#26702
symfony/symfony#27420
symfony/symfony#27419
phpspec/prophecy#412

ping @dunglas @ciaranmcnulty @dkarlovi @Wirone @teohhanhui @stof @nicolas-grekas @ondrejmirtes

Commits
-------

17c3675226 Mark ExceptionInterfaces throwable
symfony-splitter pushed a commit that referenced this pull request Aug 12, 2025
* 7.4:
  [ObjectMapper] do not require mapping a target's required promoted property when not on source (#2)
  run tests with PHPUnit 12.3
  [GitHub] Update .github/PULL_REQUEST_TEMPLATE.md to remove SF 7.2 as it's not supported anymore
  [CI] fixed the Intl data tests actions Tests fails due to unknown option -v which is shorthand of the --verbose as per the phpunit its removed without any replacement sebastianbergmann/phpunit#5647 (comment)
  [Mailer] Fix expected exception message to include quotes around "http(s)://"
  [WebProfilerBundle] Fix toolbar not rendering after replacing it
  [Validator] (60455) Validate translations for Arabic (ar)
  (60474) Remove translation state attribute for Twig template validator in Ukrainian translation
  [VarDumper] Fix dumping objects from the DOM extension
  [Mailer] Add MicrosoftGraph API Transport
  [Yaml] Fix code style
  [Tests] Adapt testAddHtmlContentWithErrors to be HTML5 compliant
  Add friendly name in the `to` field
  [ObjectMapper] read source metadata before transform
  [HtmlSanitizer] Fix force_attributes not replacing existing attribute in initial data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants