mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #1081] [CLOSED] Add "additional commands" to the Console Runner #9130
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/1081
Author: @kander-zz
Created: 7/15/2014
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
ccf88d0Add "additional commands" to the Console Runner📊 Changes
1 file changed (+18 additions, -0 deletions)
View changed files
📝
lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php(+18 -0)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.