moai-lang-php

Develop PHP 8.3+ applications for Laravel 11 and Symfony 7.

1.2k|214|Updated Sep 16, 2025
One-click install
npx skills add https://github.com/modu-ai/moai-adk --skill moai-lang-php
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-lang-php
Source: https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-lang-php
Command: npx skills add https://github.com/modu-ai/moai-adk --skill moai-lang-php

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes examples (resource) and references (resource) components.

What problem does it solve?

Keeping up with the latest PHP versions and ecosystem best practices can be challenging. This Skill provides expert guidance for PHP 8.4+, integrating PHPUnit 11 for testing, Composer for dependency management, and PSR-12 for coding standards, ensuring your PHP projects are robust and maintainable.

Core Features & Use Cases

  • PHP 8.4+ Best Practices: Guides on leveraging new language features and performance improvements.
  • Robust Testing: Implement test-driven development using PHPUnit 11 for unit and integration tests.
  • Dependency Management: Efficiently manage project dependencies with Composer 2.8.
  • Coding Standards: Enforce PSR-12 for consistent and readable code.
  • Use Case: When starting a new Laravel project, this Skill can help you set up the project structure, configure Composer, and integrate PHPUnit for a TDD workflow, ensuring adherence to modern PHP standards.

Quick Start

Install Composer dependencies

composer install

Run PHPUnit tests

./vendor/bin/phpunit

Claude can then assist with code generation and quality checks.

Frequently Asked Questions about moai-lang-php

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

FAQPage Schema
How do I set up a modern PHP 8.4+ Laravel or Symfony project with testing?

Modern PHP 8.4+ projects use Composer for dependency management, PHPUnit for testing, and PSR-12 coding standards. Start with `composer install`, configure PHPUnit, then use the Skill to scaffold controllers, models, migrations, and test suites following current framework patterns and typed properties.

What are PHP 8.4+ language features I should use in new projects?

PHP 8.4+ introduces readonly classes, typed properties, enums, attributes, and named arguments. These features improve code clarity and type safety. The Skill guides you through applying these patterns in Laravel Eloquent models, Symfony entities, controllers, and API resources.

Can I use PHPUnit 11 with Laravel 11 and Symfony 7?

Yes. PHPUnit 11 is the standard testing framework for both Laravel 11 and Symfony 7. The Skill covers unit and integration test setup, test-driven development workflows, and integration with Composer dependency management for robust application testing.

How do I enforce PSR-12 coding standards across my PHP project?

PSR-12 compliance is enforced using tools like Laravel Pint and PHP CS Fixer integrated into your development workflow. The Skill shows how to configure these tools, run them via Composer scripts, and apply modern PHP patterns consistently across controllers, models, and requests.

What's the best way to structure an API backend with Laravel or Symfony?

Structured API backends use controllers, resources, requests, models, migrations, and ORM patterns. The Skill covers Laravel Eloquent and Symfony Doctrine setup, resource classes for response formatting, request validation, routing, and containerized deployments with Docker.

Does this cover dependency management and packaging for production?

Yes. Composer 2.8 handles dependency management, and the Skill covers packaging PHP 8.3+ projects for production, including Docker deployment strategies, environment configuration, and adherence to modern PHP standards for maintainable, robust applications.