PHP Modern Best Practices & Laravel Helper

Enforce PSR-12 and PHP 8.4+ idioms in Laravel and Symfony codebases during analysis and refactoring.

2|1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/sraloff/gravityboots --skill php-modern-best-practices-laravel-helper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PHP Modern Best Practices & Laravel Helper
Source: https://github.com/sraloff/gravityboots/tree/main/.agent/skills/php-best-practices
Command: npx skills add https://github.com/sraloff/gravityboots --skill php-modern-best-practices-laravel-helper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PHP projects often drift away from modern PHP practices, leading to inconsistent code quality and security gaps. This skill defines a clear, actionable set of guidelines to keep PHP code modern, secure, and maintainable.

Core Features & Use Cases

  • Enforces PSR-12 and PHP 8.4+ idioms across codebases.
  • Guides Laravel/Symfony conventions, including controllers, services, and migrations.
  • Provides actionable reviews and refactoring recommendations for existing projects.

Quick Start

Run PHP files through static analysis to ensure compliance with modern PHP practices and framework conventions.

Frequently Asked Questions about PHP Modern Best Practices & Laravel Helper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce modern PHP best practices in an existing Laravel codebase?

To enforce modern PHP best practices in Laravel, run your controllers, models, services, and migrations through static analysis to ensure compliance with PSR-12, strict types, and secure coding patterns. This identifies inconsistencies and provides actionable refactoring recommendations.

What are the PHP 8.4+ idioms and secure coding patterns I should use?

PHP 8.4+ idioms and secure coding patterns involve using strict type declarations, comprehensive type hints, and framework-specific conventions for Laravel and Symfony. These practices improve codebase security, maintainability, and overall quality during code reviews.

Does this static analysis work with both Laravel and Symfony projects?

Yes, this static analysis works with both Laravel and Symfony projects. It guides framework-specific conventions across controllers, services, migrations, and console commands to ensure code quality and security standards are met during refactoring.

How do I refactor legacy PHP code to meet PSR-12 standards?

Refactoring legacy PHP code to meet PSR-12 standards involves analyzing existing files against modern PHP 8.4+ practices and applying actionable recommendations. This enforces strict types, proper type hints, and secure patterns across your codebase.

Why does my PHP project drift away from modern coding standards over time?

PHP projects often drift away from modern coding standards due to inconsistent practices, leading to security gaps and reduced maintainability. Defining actionable guidelines for PSR-12 and PHP 8.4+ idioms prevents this drift during continuous development.