public function __construct(Filesystem $filesystem) { parent::__construct(); $this->filesystem = $filesystem; if (class_exists(Composer52::class)) { $this->composer = app(Composer52::class); } else { $this->composer = app(Composer51::class); } }