add($defaultCommand); $application->setDefaultCommand($defaultCommand->getName()); # ... other commands here $application->run(); } }