php-laravel

Installation
SKILL.md

PHP & Laravel Development

Scoped to framework-level PHP. Work on php-src internals or a native PHP extension is C, not PHP: the ia-c-systems skill covers it, including the Zend API conventions (gen_stub arginfo, the request-scoped allocator, custom object handlers, .phpt).

Code Style

  • declare(strict_types=1) in every file
  • Happy path last -- guards and errors first, success at the end. Early returns, no else.
  • Comments explain why, never what. Never comment tests. If code needs a "what" comment, rename or restructure.
  • No single-letter variables -- $exception not $e, $request not $r
  • ?string not string|null. Always specify void. Import classnames, never inline FQN.
  • Validation uses array notation ['required', 'email'] for easier custom rule classes
  • PHPStan level 8+ (phpstan analyse --level=8); aim for 9 on new projects. @phpstan-type / @phpstan-param for generic collection types. The missing-iterable-value-type check lands at level 6 (and every level above it), so any project at 8+ inherits it: use the generic form on every iterable -- @return Collection<int, User>, @param array<int, MyObject> -- and array-shape notation array{first: SomeClass, second: SomeClass} for fixed-key returns; a bare Collection or array will not clear it.

Modern PHP (8.4)

Installs
117
GitHub Stars
33
First Seen
Feb 22, 2026
php-laravel — iliaal/ai-skills