Skip to content

Commit

Permalink
Remove unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperTey committed Nov 13, 2024
1 parent bffaf34 commit a681a41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 44 deletions.
41 changes: 0 additions & 41 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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);
// });
// }
}
6 changes: 3 additions & 3 deletions src/LaravelDDDServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a681a41

Please sign in to comment.