Skip to content

[Bug]: Declaration of Coolsam\Modules\Commands\ModuleMakeFilamentThemeCommand::handle(): int must be compatible #160

@Amirali-Bagheri

Description

@Amirali-Bagheri

What happened?

What happened?
When attempting to use the module:make:filament-theme command, a Symfony\Component\ErrorHandler\Error\FatalError occurs, indicating an incompatibility in the handle method signature. Specifically, Coolsam\Modules\Commands\ModuleMakeFilamentThemeCommand::handle(): int is not compatible with Filament\Commands\MakeThemeCommand::handle(Illuminate\Filesystem\Filesystem $filesystem): int.

The error message points to vendor/coolsam/modules/src/Commands/ModuleMakeFilamentThemeCommand.php on line 18.

Symfony\Component\ErrorHandler\Error\FatalError

Declaration of Coolsam\Modules\Commands\ModuleMakeFilamentThemeCommand::handle(): int must be compatible with Filament\Commands\MakeThemeCommand::handle(Illuminate\Filesystem\Filesystem $filesystem): int

at vendor/coolsam/modules/src/Commands/ModuleMakeFilamentThemeCommand.php:18
14▕ protected $signature = 'module:make:filament-theme {module?} {--pm=} {--F|force}';
15▕
16▕ protected $description = 'Create a new Filament theme in a module';
17▕
➜ 18▕ public function handle(): int
19▕ {
20▕ $module = $this->getModule();
21▕
22▕ $this->call('vendor:publish', [What did you expect to happen?
I expected the composer dump-autoload command to execute successfully without any method signature compatibility errors, and for the application's autoloading to be regenerated correctly.

How to reproduce the bug

  1. Ensure you have the coolsam/modules package installed in your Laravel project.
  2. Attempt to run the command in your terminal:
    composer dump-autoload
    When I do X I see Y.
    When I run composer dump-autoload, I encounter the FatalError regarding the handle method's signature incompatibility as detailed above.

I expected the composer dump-autoload command to execute successfully without any method signature compatibility errors, and for the application's autoloading to be regenerated correctly.
How to reproduce the bug
Ensure you have the coolsam/modules package installed in your Laravel project.
Attempt to run the command in your terminal:

composer dump-autoload

How to reproduce the bug

When I run composer dump-autoload, I encounter the FatalError regarding the handle method's signature incompatibility as detailed above.

Package Version

5.0.8

PHP Version

8.4

Laravel Version

12

Which operating systems does with happen with?

macOS

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions