From a681a4134a0605c36efc04060f800988cd412bc6 Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Wed, 13 Nov 2024 01:43:58 -0500 Subject: [PATCH] Remove unused code. --- src/Commands/InstallCommand.php | 41 ------------------------------- src/LaravelDDDServiceProvider.php | 6 ++--- 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/src/Commands/InstallCommand.php b/src/Commands/InstallCommand.php index 0594133..ef06bdb 100644 --- a/src/Commands/InstallCommand.php +++ b/src/Commands/InstallCommand.php @@ -3,16 +3,11 @@ namespace Lunarstorm\LaravelDDD\Commands; use Illuminate\Console\Command; -use Illuminate\Foundation\Console\InteractsWithComposerPackages; -use Lunarstorm\LaravelDDD\Support\DomainResolver; -use Symfony\Component\Process\Process; use function Laravel\Prompts\confirm; class InstallCommand extends Command { - use InteractsWithComposerPackages; - public $signature = 'ddd:install {--composer=global : Absolute path to the Composer binary which should be used}'; protected $description = 'Install and initialize Laravel-DDD'; @@ -30,40 +25,4 @@ public function handle(): int return self::SUCCESS; } - - // public function registerDomainAutoload() - // { - // $domainPath = DomainResolver::domainPath(); - - // $domainRootNamespace = str(DomainResolver::domainRootNamespace()) - // ->rtrim('/\\') - // ->toString(); - - // $this->comment("Registering domain path `{$domainPath}` in composer.json..."); - - // $composerFile = base_path('composer.json'); - // $data = json_decode(file_get_contents($composerFile), true); - // data_fill($data, ['autoload', 'psr-4', $domainRootNamespace . '\\'], $domainPath); - - // file_put_contents($composerFile, json_encode($data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT)); - - // $this->composerReload(); - // } - - // protected function composerReload() - // { - // $composer = $this->option('composer'); - - // if ($composer !== 'global') { - // $command = ['php', $composer, 'dump-autoload']; - // } else { - // $command = ['composer', 'dump-autoload']; - // } - - // (new Process($command, base_path(), ['COMPOSER_MEMORY_LIMIT' => '-1'])) - // ->setTimeout(null) - // ->run(function ($type, $output) { - // $this->output->write($output); - // }); - // } } diff --git a/src/LaravelDDDServiceProvider.php b/src/LaravelDDDServiceProvider.php index aeba7b1..22025d0 100644 --- a/src/LaravelDDDServiceProvider.php +++ b/src/LaravelDDDServiceProvider.php @@ -102,9 +102,9 @@ protected function registerMigrations() public function packageBooted() { - $this->publishes([ - $this->package->basePath('/../stubs') => $this->app->basePath("stubs/{$this->package->shortName()}"), - ], "{$this->package->shortName()}-stubs"); + // $this->publishes([ + // $this->package->basePath('/../stubs') => $this->app->basePath("stubs/{$this->package->shortName()}"), + // ], "{$this->package->shortName()}-stubs"); if ($this->app->runningInConsole() && method_exists($this, 'optimizes')) { $this->optimizes(