Skip to content

Conversation

LizardEngineer
Copy link
Contributor

The motivation

I'm working on a project with PHPStan enabled at the max level. Every time I generate an API service, PHPStan complains about the generated files, and I've got to fix them manually.

The fix

After digging for a bit, I learned that this package uses CanManipulateFiles trait, which checks for the existence of the stub under stubs/filament before using the one in the package.
So easily enough, I borrowed a couple of lines from filament's repository https://github.com/filamentphp/filament/blob/3.x/packages/panels/src/FilamentServiceProvider.php#L95-L100 to satisfy the need.

Suggestion

I want to open another PR to correctly type the generated files so PHPStan can live with them peacefully if @rupadana doesn't mind it

Screenshots

image image

@rupadana rupadana merged commit 43f19c4 into rupadana:main Jul 1, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants