programming-php

Enforces typed, layered architecture for modern PHP 8.1+ applications.

3|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/Muvon/octomind-tap --skill programming-php
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: programming-php
Source: https://github.com/Muvon/octomind-tap/tree/main/skills/programming-php
Command: npx skills add https://github.com/Muvon/octomind-tap --skill programming-php

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It solves the problem of PHP codebases degrading into loosely typed, framework-entangled “big ball of mud” systems that are hard to test, maintain, and evolve.

Core Features & Use Cases

  • Strict, type-driven PHP foundations: Enforces strict types, native typing, immutability for DTO/value objects, and enums for finite sets.
  • Clean architecture guidance for frameworks: Keeps domain logic framework-free, pushes infrastructure concerns (Eloquent/Doctrine, HTTP/queues) to the edges, and clarifies dependency direction.
  • Production-grade engineering practices: Covers error handling, persistence patterns, performance concerns (e.g., avoiding N+1), and robust testing/testing boundaries.
  • Use Case: Refactor a Laravel or Symfony application into domain/application/infrastructure layers with DTOs, repository interfaces, and predictable exception handling so changes become safer and tests become meaningful.

Quick Start

Ask the skill to propose a strict-typed directory and layering plan for your current PHP project, including how to separate domain, application, and infrastructure while enforcing error-handling and testing boundaries.

Frequently Asked Questions about programming-php

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

FAQPage Schema
How do I refactor a Laravel application into domain-driven design layers?

Refactoring Laravel into domain-driven design layers involves separating domain, application, and infrastructure logic while keeping domain code framework-free. This skill guides strict-typed directory reorganization, pushing Eloquent persistence and HTTP concerns to the edges for safer changes.

What is the best way to enforce strict typing and immutability in PHP DTOs?

Enforcing strict typing and immutability in PHP DTOs requires using strict_types declarations and native type hints. This skill provides conventions for building immutable, typed value objects and DTOs to prevent loosely typed data structures in modern PHP 8.2+ applications.

Does this approach work with both Symfony and Laravel codebases?

Yes, this architecture approach works with both Symfony and Laravel codebases. It applies dependency inversion to keep framework-edge concerns separated, ensuring your domain logic remains testable and free from infrastructure entanglement across either PHP framework.

How do I structure PHPUnit testing boundaries in a layered PHP architecture?

Structuring PHPUnit testing boundaries requires isolating domain logic from infrastructure dependencies like Eloquent or Doctrine. This skill standardizes repository interfaces and predictable exception handling, enabling meaningful tests that validate domain rules without framework coupling.

Why does my PHP codebase degrade into a big ball of mud?

A PHP codebase degrades into a big ball of mud when domain logic becomes heavily entangled with framework infrastructure and lacks strict type boundaries. This skill solves the problem by enforcing typed DTOs, layered separation, and dependency inversion for maintainable evolution.