sinnbeck / laravel-served

Docker version of artisan serve (with alot more)
MIT License
74 stars 13 forks source link

Add Verbosity options to commands #21

Closed pfaffenrodt closed 4 years ago

pfaffenrodt commented 4 years ago

use -v or --verbose to write actual command use -vv to print also raw command output

20

Note

Symfony Process has no option to create actual command line.
Also all related methods are private (used reflection to replace variables).
Replace ConsoleOutput with OutputInterface, because ConsoleOutput had wrong settings of verbosity.

sinnbeck commented 4 years ago

Very nice solution. Can get a bit verbose for some commands, so I might choose to break up some none verbose alternatives.

I like that you chose to use reflection to tab into symfony instead of trying to write you own

Did you forget to remove this code snippet? Seems unused :) Apart from that, all is good.


protected function internal_replacePlaceholders($command, $env = []) {
        return $this->privateMethod($this, 'replacePlaceholders')->invoke($this);
    }
pfaffenrodt commented 4 years ago

Very nice solution. Can get a bit verbose for some commands, so I might choose to break up some none verbose alternatives.

I like that you chose to use reflection to tab into symfony instead of trying to write you own

Did you forget to remove this code snippet? Seems unused :) Apart from that, all is good.

protected function internal_replacePlaceholders($command, $env = []) {
        return $this->privateMethod($this, 'replacePlaceholders')->invoke($this);
    }

I forgot to replace the related call $this->privateMethod($this, 'replacePlaceholders')->invoke($this, $command, $env); with internal_replacePlaceholders

sinnbeck commented 4 years ago

I misread the instructions. Thought they meant labels on issues. Added to the project now also