novadaemon / filament-combobox

Side by side combobox multiselect field to use in the FilamentPHP forms.
https://filamentphp.com/plugins/novadaemon-combobox
MIT License
11 stars 2 forks source link

Mismatch Between Class Names and File Names Causing Autoload Error #2

Closed Morgnus closed 2 months ago

Morgnus commented 2 months ago

Description:

There are two classes in the repository with mismatched file names, causing an autoload error during the composer dump-autoload process. The error specifically occurs when attempting to load the FilamentComboboxServiceProvider class.

Details:

Class Name: Combobox Current File Name: ComboBox.php Expected File Name: Combobox.php

Class Name: FilamentComboboxServiceProvider Current File Name: FilamentComboBoxServiceProvider.php Expected File Name: FilamentComboboxServiceProvider.php

Error Message:

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In ProviderRepository.php line 206:

Class "Novadaemon\FilamentCombobox\FilamentComboboxServiceProvider" not found

Impact:

This issue primarily affects environments with case-sensitive filesystems, such as Linux. On macOS, which uses a case-insensitive filesystem by default, this mismatch might not cause any problems. However, in Linux environments, the discrepancy can lead to failures during the autoload process, preventing commands from running and the application from being deployed correctly.

novadaemon commented 2 months ago

Fixed. For some unknown reason I had git settings set to ignorecase=true and changes to file names were not indexed in the repository. That's why when I ran phpstan it never reported the error. Thanks for spotting it.

image