ariaieboy / filament-currency

Enhanced Currency Related stuff for Filament
MIT License
42 stars 8 forks source link

[Bug]: "Multiple Definitions Exist for class Filament\Forms\Components\TextInput" #12

Closed Jacotheron closed 10 months ago

Jacotheron commented 10 months ago

What happened?

While not really a bug, it is an annoyance.

In short I am using PHPStorm, along with the "PHP Hammer" plugin, used to inspect code, help with auto complete, provide potential optimizations and reduce the chances of errors and other bugs. It is complaining about the "ide-helper.stubs.php" file in the root of this package. While Composer would not make this file visible to the project, PHP Hammer is parsing it and complaining about it (marking it as a potential issue on every single Filament Resource class, that is using the TextInput). The same also happens for the "Filament\Tables\Columns\TextColumn" (also in the same file).

Is this file required for anyone implementing your package or is it something that is not really required?

How to reproduce the bug

As above, open a Filament project (with this filament-currency package) in PHPStorm with the "PHP Hammer" plugin, and viewing any filament Resource class with at least one TextInput, will show it highlighted (stating "Multiple Definitions Exist for class Filament\Forms\Components\TextInput")

Package Version

1.2.1

PHP Version

8.1

Laravel Version

10.33

Which operating systems does with happen with?

Windows

Notes

No response

ariaieboy commented 10 months ago

This file is just an ide-helper so phpstorm can detect our macros for the TextInput class. I am using phpstorm + larastan and I don't have any problem. You can exclude the stub file from phpstorm files. I don't know about the Hammer PHP plugin.