#larastan — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #larastan, aggregated by home.social.
-
Any PHPStan/Larastan experts out there? Currently on level 2 and getting an error about a missing var. I don't really want to add another line to fix nor do I want to ignore this line, is there a better way?
Maybe @jclermont knows?
-
#7 🔍 Run regular security audits using #Larastan, #PHPStan and security checkers
https://dev.to/sharifcse58/15-laravel-security-best-practices-in-2025-2lco -
- "My library has 100% code coverage!"
- "How so?"
- "Because I test thoroughly"* opens editor *
* CTRL+F *
* @phpstan-ignore-line *
* Found 587 occurrences *
#Programming #PHP #PHPStan #Larastan #Laravel #Symfony #CodeCoverage #Coding #Code #SoftwareDevelopment #Software #WebDevelopment #WebDev
-
Setting up #PHPStorm to handle #PHPStan / #Larastan, Laravel Pint, Code Sniffer and CS_Fixer (not sure if this is needed with Laravel Pint). What is the best way to set this up so I don't have to set this up for every project? Tried to point to a globally installed version of each but wasn't able to easily do this.
Suggestions or a pointer to a tutorial would be fabuluous!
-
New plugin for #PHP #Pest to give you type coverage right in Pest. Simply `composer require pestphp/pest-plugin-type-coverage —dev` and then run Pest with `pest —type-coverage -min=100` Perhaps you won’t need #PHPStan or #LaraStan anymore.
Four other great new features in Pest in Like Downing’s video on Laracasts here https://laracasts.com/series/lukes-larabits/episodes/7
-
Last two days I struggled getting #larastan to accept
$response = collect($rows->response);
The error was 'Unable to resolve the template type TKey/TValue in call to function collect‘.
The solution (for me) is to add the type onto a variable first, and then use that variable in the #laravel collect() method. Hope this helps others, or if you feel this can be improved upon, please do let me know (suggestion came from this issue https://github.com/nunomaduro/larastan/issues/1115)
-
Using #larastan (level 6), down to 11 errors now. Struggling to get my arrays typed correctly, and handling property assignments now. Otherwise, enjoying the massive cleanup of my code.