common: [Bug]: Argument #1 ($plugin) must be of type string, array given
Lang Package Name
laravel-lang/publisher
Lang Package Version
16.4
Laravel Framework Version
11.9.2
PHP Version
8.3.7
Dependencies
"require": {
"php": "^8.2",
"laravel/framework": "^11.9",
"laravel/tinker": "^2.9",
"lcobucci/jwt": "^5.3",
"overtrue/laravel-versionable": "^5.2",
"rappasoft/laravel-livewire-tables": "^3.2",
"wire-elements/modal": "^2.0"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel-lang/lang": "^15.4",
"laravel/breeze": "^2.0",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0.1"
},
Issue description
php artisan lang:update
INFO Collecting translations...
TypeError
LaravelLang\Publisher\Processors\Processor::LaravelLang\Publisher\Processors\{closure}(): Argument #1 ($plugin) must be of type string, array given
at vendor/laravel-lang/publisher/src/Processors/Processor.php:150
146▕ protected function plugins(): array
147▕ {
148▕ return collect($this->config->getPlugins())
149▕ ->map(fn (array $plugins) => collect($plugins)
➜ 150▕ ->map(static fn (string $plugin) => new $plugin())
151▕ ->filter(static fn (Plugin $plugin) => $plugin->has())
152▕ ->all()
153▕ )
154▕ ->filter()
+1 vendor frames
2 [internal]:0
LaravelLang\Publisher\Processors\Processor::LaravelLang\Publisher\Processors\{closure}([], "/Users/...")
+18 vendor frames
21 artisan:13
Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))
Steps to reproduce
I don’t know. On 16.3 the error don’t appear.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (14 by maintainers)
Everything works with new version. Thank you for the quick help!
Thank you for your support!
I’ll fix that in the near future. Thank you!