laravel-love icon indicating copy to clipboard operation
laravel-love copied to clipboard

[9.x] Remove dependencies from console commands constructors

Open antonkomarev opened this issue 4 years ago • 0 comments

It will be better to remove dependencies from constructor methods of the console commands because Laravel loading those dependencies not on command usage but on command registering.

For example in class Cog\Laravel\Love\Console\Commands\SetupReactable there are dependencies in constructor:

public function __construct(Filesystem $files, MigrationCreator $creator, Composer $composer)
{
    parent::__construct();

    $this->files = $files;
    $this->creator = $creator;
    $this->composer = $composer;
}

antonkomarev avatar Sep 08 '20 22:09 antonkomarev