Skip to content

Commit 182e927

Browse files
authored
Merge pull request #2038 from alissn/CleanUp
[delete] delete unused files and command and test
2 parents f90762b + 95f4cc1 commit 182e927

File tree

8 files changed

+1
-210
lines changed

8 files changed

+1
-210
lines changed

src/Commands/ModuleClearCompiledCommand.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/Commands/ModuleDiscoverCommand.php

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/LaravelModulesServiceProvider.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@
77
use Illuminate\Database\Migrations\Migrator;
88
use Illuminate\Filesystem\Filesystem;
99
use Illuminate\Foundation\Console\AboutCommand;
10-
use Illuminate\Support\Facades\Artisan;
11-
use Illuminate\Support\Facades\Event;
1210
use Illuminate\Translation\Translator;
13-
use Nwidart\Modules\Constants\ModuleEvent;
1411
use Nwidart\Modules\Contracts\ActivatorInterface;
1512
use Nwidart\Modules\Contracts\RepositoryInterface;
1613
use Nwidart\Modules\Exceptions\InvalidActivatorClass;
1714
use Nwidart\Modules\Support\Stub;
18-
use Symfony\Component\Console\Output\NullOutput;
1915

2016
class LaravelModulesServiceProvider extends ModulesServiceProvider
2117
{
@@ -38,8 +34,6 @@ public function boot()
3834

3935
$this->registerModules();
4036

41-
$this->registerEvents();
42-
4337
AboutCommand::add('Laravel-Modules', [
4438
'Version' => fn () => InstalledVersions::getPrettyVersion('nwidart/laravel-modules'),
4539
]);
@@ -133,17 +127,4 @@ protected function registerTranslations(): void
133127
});
134128
});
135129
}
136-
137-
private function registerEvents(): void
138-
{
139-
Event::listen(
140-
[
141-
'modules.*.'.ModuleEvent::DELETED,
142-
'modules.*.'.ModuleEvent::CREATED,
143-
'modules.*.'.ModuleEvent::DISABLED,
144-
'modules.*.'.ModuleEvent::ENABLED,
145-
],
146-
fn () => Artisan::call('module:clear-compiled', outputBuffer: new NullOutput)
147-
);
148-
}
149130
}

src/ModulesServiceProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ public function register() {}
2626
*/
2727
protected function registerModules()
2828
{
29-
// $this->app->register(\Nwidart\Modules\Providers\BootstrapServiceProvider::class);
30-
31-
$manifest = app()->make(ModuleManifest::class);
29+
$manifest = app(ModuleManifest::class);
3230

3331
(new ProviderRepository($this->app, new Filesystem, $this->getCachedModulePath()))
3432
->load($manifest->getProviders());

src/Providers/BootstrapServiceProvider.php

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/Providers/ConsoleServiceProvider.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ public static function defaultCommands(): Collection
9494
// Other Commands
9595
Commands\ComposerUpdateCommand::class,
9696
Commands\LaravelModulesV6Migrator::class,
97-
Commands\ModuleDiscoverCommand::class,
98-
Commands\ModuleClearCompiledCommand::class,
9997
Commands\SetupCommand::class,
10098
Commands\UpdatePhpunitCoverage::class,
10199

tests/Commands/Actions/ClearCompiledCommandTest.php

Lines changed: 0 additions & 43 deletions
This file was deleted.

tests/Commands/Actions/ModuleDiscoverCommandTest.php

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)