/php:php-8-3from php
Enforces PHP 8.3 typed class constants and private-by-default visibility. Provides a decision heuristic for when to promote to public.
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.
Two project conventions for class constants: type them, and keep them private by default.
// AVOID
private const TRANSLATION_DOMAIN = 'messages';
private const MAX_ITEMS = 100;
// CORRECT
private const string TRANSLATION_DOMAIN = 'messages';
private const int MAX_ITEMS = 100;
Supported types: string, int, float, bool, array, class/interface names, mixed.
Default to private for class constants. Promote to public only when an
external consumer (template, sibling class, public API) actually reads it. Don't
mirror the visibility of a neighbor constant without checking — the principle of
least visibility wins over consistency.
// AVOID — public by default, no external consumer
final class CheckoutController
{
public const string ROUTE_NAME = 'checkout_index';
public const string CART_COOKIE_NAME = 'cart_token';
// ...
}
// CORRECT — private until proven otherwise
final class CheckoutController
{
private const string ROUTE_NAME = 'checkout_index';
private const string CART_COOKIE_NAME = 'cart_token';
// ...
}
// CORRECT — public is justified, the constant is actually read elsewhere
final class OrderConfirmationController
{
// Read by templates/order/index.html.twig via path('order_confirmation', ...)
// and by CheckoutController to redirect after a successful checkout.
public const string ROUTE_NAME = 'order_confirmation';
}
Decision heuristic before writing public const: grep for usages outside
the declaring class. No hit → private. Hit → public and add a brief
comment naming the consumer (helps future cleanup when the consumer disappears).
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-Other plugins' skills for the same job