/php:php-8-2from php
Mandates class-level `readonly` over per-property `readonly` in PHP 8.2+ projects. Activates when writing DTOs, value objects, or PHP classes.
Ships in php. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The key project convention: always use readonly class instead of per-property readonly.
// AVOID: readonly on each property
final class OrderSummary
{
public function __construct(
private readonly string $orderUuid,
private readonly string $buyerUuid,
) {}
}
// CORRECT: readonly on the class
final readonly class OrderSummary
{
public function __construct(
private string $orderUuid,
private string $buyerUuid,
) {}
}
Use readonly class when all properties should be readonly (most DTOs, value objects, services). Keep per-property readonly only when some properties need to be mutable.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fabiensalles/claude-marketplace --plugin php10 skills in this plugin
/php-8-0ACTIVATE when calling a constructor, method or function with four or more arguments in a PHP 8.0+ project — value objects, contract requests, factories, projections, test fixtures. Covers: mandatory named arguments from the fourth argument on. DO NOT use for: calls of three arguments or fewer, PHP 8.1 features (see php-8-1), PHP 8.2 features (see php-8-2), PHP 8.3 features (see php-8-3)./php-8-1ACTIVATE when passing a method as a callback in a PHP 8.1+ project — event listeners, validator callbacks, Twig functions, array_map/usort callables. Covers: mandatory first-class callable syntax (`$this` method reference with `(...)`) over array/string callables. DO NOT use for: general PHP syntax, PHP 8.2 features (see php-8-2), PHP 8.3 features (see php-8-3)./php-8-3ACTIVATE when writing PHP class constants in a PHP 8.3+ project. Covers: mandatory typed class constants and default visibility. DO NOT use for: general PHP syntax, PHP 8.2 features (see php-8-2)./php-code-conventionsACTIVATE whenever writing or modifying PHP code in src/, creating controllers, services, repositories, specifications, or any production PHP class. ACTIVATE for code review, formatting questions, or 'coding standards'. Provides PHP-specific code style examples for the cross-language rules defined in craft:code-style-principles, plus PHP-specific rules (no empty(), nullsafe operator access, nowdoc, constructor parameter ordering with promoted properties). DO NOT use for: test code conventions (see phpunit:php-test-conventions), SQL formatting (see php-sql-conventions)./php-composer-conventionsACTIVATE when modifying composer.json, adding/updating dependencies, or running composer commands. ACTIVATE for 'composer require', 'composer update', version constraints. Covers: caret versioning policy, forbidden patterns (*, dev-master, exact versions), internal package exception (dev-main as x.y.z), update strategy. DO NOT use for: autoloading, PHP code, Symfony configuration./php-ddd-conventionsACTIVATE when writing or modifying domain layer code in PHP/Symfony, creating value objects, specifications, domain services, or domain interfaces. ACTIVATE for 'domain', 'DDD', 'hexagonal', 'ports and adapters', 'domain purity' in PHP context. Provides PHP/Symfony-specific examples for cross-language OOP DDD principles defined in craft:ddd-principles. DO NOT use for: infrastructure/controller code, Doctrine mapping, general architecture questions.Other plugins' skills for the same job