Closed jackchang1025 closed 2 weeks ago
composer show nwidart/laravel-modules name : nwidart/laravel-modules descrip. : Laravel Module management keywords : laravel, module, modules, nwidart, rad versions : * v11.1.4 released : 2024-09-22, 1 month ago type : library license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText homepage : source : [git] https://github.com/nWidart/laravel-modules.git fb1f6bd7b168baaa6212dee678c18fc983d47ed4 dist : [zip] https://api.github.com/repos/nWidart/laravel-modules/zipball/fb1f6bd7b168baaa6212dee678c18fc983d47ed4 fb1f6bd7b168baaa6212dee678c18fc983d47ed4 path : /var/www/html/vendor/nwidart/laravel-modules names : nwidart/laravel-modules
support issues : https://github.com/nWidart/laravel-modules/issues source : https://github.com/nWidart/laravel-modules/tree/v11.1.4
autoload files psr-4 Nwidart\Modules\ => src
requires ext-dom ext-json ext-simplexml * php >=8.2 wikimedia/composer-merge-plugin ^2.1
requires (dev) friendsofphp/php-cs-fixer ^v3.52 laravel/framework ^v11.0 laravel/pint ^1.16 mockery/mockery ^1.6 orchestra/testbench ^v9.0 phpstan/phpstan ^1.4 phpunit/phpunit ^11.0 spatie/phpunit-snapshot-assertions ^5.0
- Laravel Version: #.#.# ```bash root@0f1c408a92d6:/var/www/html# php artisan --version Laravel Framework 11.27.2
root@0f1c408a92d6:/var/www/html# php -v PHP 8.3.11 (cli) (built: Aug 30 2024 09:27:49) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.11, Copyright (c) Zend Technologies with Zend OPcache v8.3.11, Copyright (c), by Zend Technologies with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
root@0f1c408a92d6:/var/www/html# php artisan module:make Demo INFO Creating module: [Demo]. Generating file Modules/Demo/module.json ................................................... 0.09ms DONE Generating file Modules/Demo/routes/web.php ................................................ 0.07ms DONE Generating file Modules/Demo/routes/api.php ................................................ 0.06ms DONE Generating file Modules/Demo/resources/views/index.blade.php ............................... 0.03ms DONE Generating file Modules/Demo/resources/views/layouts/master.blade.php ...................... 0.08ms DONE Generating file Modules/Demo/config/config.php ............................................. 0.03ms DONE Generating file Modules/Demo/composer.json ................................................. 0.09ms DONE Generating file Modules/Demo/database/seeders/DemoDatabaseSeeder.php ....................... 0.08ms DONE Generating file Modules/Demo/app/Providers/DemoServiceProvider.php ......................... 0.02ms DONE Generating file Modules/Demo/app/Providers/EventServiceProvider.php ........................ 0.03ms DONE Generating file Modules/Demo/app/Providers/RouteServiceProvider.php ........................ 0.02ms DONE Generating file Modules/Demo/app/Http/Controllers/DemoController.php ....................... 0.02ms DONE INFO Module [Demo] created successfully. //composer.json { "name": "nwidart/demo", "description": "", "authors": [ { "name": "Nicolas Widart", "email": "n.widart@gmail.com" } ], "extra": { "laravel": { "providers": [], "aliases": { } } }, "autoload": { "psr-4": { "Modules\\Demo\\": "app/", "Modules\\Demo\\Database\\Factories\\": "database/factories/", "Modules\\Demo\\Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Modules\\Demo\\Tests\\": "tests/" } } } root@0f1c408a92d6:/var/www/html# php artisan module:publish-config Demo INFO Publishing module config files ... INFO No publishable resources for tag [config]. //this error //vendor/nwidart/laravel-modules/src/Commands/Publish/PublishConfigurationCommand.php namespace Nwidart\Modules\Commands\Publish; use Illuminate\Support\Str; use Nwidart\Modules\Commands\BaseCommand; use Symfony\Component\Console\Input\InputOption; class PublishConfigurationCommand extends BaseCommand { /** * The console command name. * * @var string */ protected $name = 'module:publish-config'; /** * The console command description. * * @var string */ protected $description = 'Publish a module\'s config files to the application'; public function executeAction($name): void { $this->call('vendor:publish', [ '--provider' => $this->getServiceProviderForModule($name), '--force' => $this->option('force'), '--tag' => ['config'], ]); } public function getInfo(): ?string { return 'Publishing module config files ...'; } /** * @param string $module */ private function getServiceProviderForModule($module): string { $namespace = $this->laravel['config']->get('modules.namespace'); $studlyName = Str::studly($module); $provider = $this->laravel['config']->get('modules.paths.generator.provider.path'); //use config path, so path Modules/Demo/app/Providers/DemoServiceProvider.php //but register DemoServiceProvider path is Modules/Demo/Providers/DemoServiceProvider.php $provider = str_replace('/', '\\', $provider); return "$namespace\\$studlyName\\$provider\\{$studlyName}ServiceProvider"; } protected function getOptions(): array { return [ ['--force', '-f', InputOption::VALUE_NONE, 'Force the publishing of config files'], ]; } }
identified the problem, applied a fix, will be doing a release shortly.
Versions:
support issues : https://github.com/nWidart/laravel-modules/issues source : https://github.com/nWidart/laravel-modules/tree/v11.1.4
autoload files psr-4 Nwidart\Modules\ => src
requires ext-dom ext-json ext-simplexml * php >=8.2 wikimedia/composer-merge-plugin ^2.1
requires (dev) friendsofphp/php-cs-fixer ^v3.52 laravel/framework ^v11.0 laravel/pint ^1.16 mockery/mockery ^1.6 orchestra/testbench ^v9.0 phpstan/phpstan ^1.4 phpunit/phpunit ^11.0 spatie/phpunit-snapshot-assertions ^5.0
Description:
Steps To Reproduce: