filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.48k stars 2.73k forks source link

Version v2.10.15 missing semicolon in CanCreateRecords #1740

Closed mallardduck closed 2 years ago

mallardduck commented 2 years ago

Package

filament/filament

Package Version

v2.10.15

Laravel Version

v9

Livewire Version

No response

PHP Version

PHP 8.1.3

Bug description

When setting up Filament I found that the current latest release is flawed and has a broken line.

Steps to reproduce

Install the affected version and load a page that uses this trait.

Relevant log output

> During class fetch: Uncaught ParseError: syntax error, unexpected token "}", expecting ";" in vendor/filament/filament/src/Resources/Pages/ListRecords/Concerns/CanCreateRecords.php:100

https://github.com/laravel-filament/filament/blob/819d69e0371c8b886c710601673572059753bad0/packages/admin/src/Resources/Pages/ListRecords/Concerns/CanCreateRecords.php#L99

ManojKiranA commented 2 years ago

@danharrin I think I have missed the semicolon. And CI failed to catch the bug. We need to start adding more tests

mallardduck commented 2 years ago

Could be good to re-enable the phpstan workflows. Seems they are manually disabled currently.

danharrin commented 2 years ago

They've been disabled since the L9 upgrade, because I haven't had time to fix them yet (even though the code works fine). Otherwise yeah, PHPstan will have caught this.

I'll start manually running PHPstan before every release, until we have the workflow working again.

ryangjchandler commented 2 years ago

@danharrin Since I fixed up the PHPStan stuff, the workflow should mostly run fine I think.

mallardduck commented 2 years ago

I have a PR to fix the handful of issues PHPStan is alerting on locally. Here's the changes I found were needed: https://github.com/laravel-filament/filament/pull/1749