8000 [Console] Add command resolver (proof of concept) by funivan · Pull Request #16438 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Add command resolver (proof of concept) #16438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix code style
  • Loading branch information
Ivan Scherbak committed Nov 3, 2015
commit 997d45dcba5379bda4ce6b12743704cc0895dc3e
7 changes: 3 additions & 4 deletions src/Symfony/Component/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@
*/
class Application
{

/**
* @var CommandResolverInterface
*/
/**
* @var CommandResolverInterface
*/
private $commands;
Copy link
Member

Choose a reason for hiding this comment

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

commandResolver would be a better name

private $wantHelps = false;
private $runningCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
interface CommandResolverInterface
{

/**
* @param Command $command
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use Symfony\Component\Console\Tests\Fixtures\LazyTestCommand;

/**
* @author Ivan Shcherbak <dev@funivan.com>
*/
* @author Ivan Shcherbak <dev@funivan.com>
*/
class CommandResolverTest extends \PHPUnit_Framework_TestCase
{
public function testLazyCommandResolver()
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong indent in whole file. Use 4 spaces not 2.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry for that. I will fix it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class CustomCommandResolver implements CommandResolverInterface
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not extend existing one and just add default fixture code in constructor?

Copy link
Author

Choose a reason for hiding this comment

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

I want to show how to implement CommandResolverInterface from zero.
What do you mean: add default fixture code in constructor? Can you show me an example, I don`t understand.

{
/**
/**
* Cache commands.
*
* @var array
Expand Down
0