Currently, I have the "protonemedia/laravel-form-components" library installed: "^3.6" in my componser.json.
I have tried to install also the "rawilk/laravel-form-components" library: "^7.1.3" without success, I get an error in the console and I suspect it might be due to the same name of both libraries
it seems to me that due to the similarity of the name, is logging the wrong class
Call to undefined method ProtoneMedia\LaravelFormComponents\Components\Form::assets()
Steps to reproduce
Add "protonemedia/laravel-form-components": "^3.6", to composer.json file in "require" section
Run composer install
Add "rawilk/laravel-form-components" library: "^7.1.3" to composer.json file in "require" section or run composer require rawilk/laravel-form-components in console
Get the error
Relevant log output
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Error
Call to undefined method ProtoneMedia\LaravelFormComponents\Components\Form::assets()
at C:\laragon\www\new-tabimuse\vendor\rawilk\laravel-form-components\src\FormComponentsServiceProvider.php:127
123▕ if (! class_exists($component)) {
124▕ return;
125▕ }
126▕
➜ 127▕ foreach ($component::assets() as $asset) {
128▕ $files = (array) ($assets[$asset] ?? []);
129▕
130▕ collect($files)->filter(function (string $file) {
131▕ return Str::endsWith($file, '.css');
1 C:\laragon\www\new-tabimuse\vendor\rawilk\laravel-form-components\src\FormComponentsServiceProvider.php:63
Rawilk\FormComponents\FormComponentsServiceProvider::registerAssets("ProtoneMedia\LaravelFormComponents\Components\Form", ["https://unpkg.com/alpinejs@3.9.3/dist/cdn.min.js", "https://unpkg.com/@popperjs/core@2"])
2 C:\laragon\www\new-tabimuse\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:266
Rawilk\FormComponents\FormComponentsServiceProvider::Rawilk\FormComponents\{closure}(Object(Illuminate\View\Compilers\BladeCompiler), Object(Illuminate\Foundation\Application))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Laravel Form Components Version
v7.1.3
Laravel Version
v9.2
Alpine Version
v3.0.6
Bug description
Currently, I have the "protonemedia/laravel-form-components" library installed: "^3.6" in my componser.json.
I have tried to install also the "rawilk/laravel-form-components" library: "^7.1.3" without success, I get an error in the console and I suspect it might be due to the same name of both libraries
the error while autoloading is:
it seems to me that due to the similarity of the name, is logging the wrong class
Steps to reproduce
"protonemedia/laravel-form-components": "^3.6",
to composer.json file in "require" sectioncomposer install
"rawilk/laravel-form-components" library: "^7.1.3"
to composer.json file in "require" section or runcomposer require rawilk/laravel-form-components
in consoleRelevant log output