DDC-3213: [GH-1081] Add "additional commands" to the Console Runner #3980

Closed
opened 2026-01-22 14:32:45 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 15, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of kander:

Url: https://github.com/doctrine/doctrine2/pull/1081

Message:

Currently, using Migrations in a Doctrine projects requires you to roll your own CLI. We already have a cli-config.php which is called when running /vendor/bin/doctrine.php - however, that only allows us to inject a HelperSet. It does not offer a mechanism to inject additional commands into the CLI application.

If this patch is accepted, I'll submit a suggestion for Migrations' documentation to call:

ConsoleRunner::addAdditionalCommand(new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand);
ConsoleRunner::addAdditionalCommand(new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand);
... etc

I'm not 100% whether line 73 should be in ConsoleRunner::addCommands() or ConsoleRunner::run() - I've placed it in run() for now.

Originally created by @doctrinebot on GitHub (Jul 15, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of kander: Url: https://github.com/doctrine/doctrine2/pull/1081 Message: Currently, using Migrations in a Doctrine projects requires you to roll your own CLI. We already have a cli-config.php which is called when running /vendor/bin/doctrine.php - however, that only allows us to inject a HelperSet. It does not offer a mechanism to inject additional commands into the CLI application. If this patch is accepted, I'll submit a suggestion for Migrations' documentation to call: ConsoleRunner::addAdditionalCommand(new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand); ConsoleRunner::addAdditionalCommand(new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand); ... etc I'm not 100% whether line 73 should be in ConsoleRunner::addCommands() or ConsoleRunner::run() - I've placed it in run() for now.
admin added the Bug label 2026-01-22 14:32:45 +01:00
admin closed this issue 2026-01-22 14:32:45 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jul 15, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1081] was closed:
https://github.com/doctrine/doctrine2/pull/1081

@doctrinebot commented on GitHub (Jul 15, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1081] was closed: https://github.com/doctrine/doctrine2/pull/1081
Author
Owner

@doctrinebot commented on GitHub (Jul 15, 2014):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Jul 15, 2014): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3980