Repository navigation
feat: initial php-coding plugin (v0.1.0) - #1
Merged
Merged
Conversation
Claude Code and Cursor manifests with identical name, version, description, and author. The Cursor manifest declares the skills, agents, rules, and hooks paths. Adds .gitignore (eval results, local notes, tool caches) and .gitattributes (export-ignore for maintainer files). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PER-CS plus declare_strict_types, PHPStan level 8 with phpVersion 80400, and an optional Rector config pinned to PHP 8.4 with no prepared sets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One knowledge skill: SKILL.md routes each change to the command to run and a reference to read. References cover style (PER 3.1), idioms (types, exceptions, 8.4 forms, 8.5 hints), testing (PHPUnit 12), security, compatibility, the PSR interfaces, Guzzle, Monolog, OpenTelemetry, Slim, and standalone Symfony components. Each rule cites a primary source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Writes the reference php-cs-fixer and PHPStan config into a repository without overwriting existing files. Rector only when asked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Report-only reviewer for what php-cs-fixer and PHPStan level 8 miss. Loads php-coding through the Skill tool and cites the reference for each finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors the php-coding index table for **/*.php files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
session-start prints one standards line in a PHP workspace and names the
library references that match composer.json. format-on-save runs
php-cs-fixer on the edited file when a config and a binary exist, reading the
path from the host's stdin payload. Both always exit 0. Claude commands quote
${CLAUDE_PLUGIN_ROOT}; the timeout is 20 seconds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eleven claude plugin eval cases. Each grades the answer, checks that php-coding fired, and checks that the matching reference file was read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stdlib-only validator for manifests and parity, kebab-case names, frontmatter (including the unquoted colon trap), description length, reference links and orphans, and the Cursor rule mirror. The workflow runs it on pushes to main and on pull requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md is the canonical instruction set, imported by .claude/CLAUDE.md. Adds install, testing, versioning, and authoring guides, the README component overview, and the 0.1.0 changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrites second-person phrasing as instructions, per the plugin-dev skill-development writing style. Verbatim quotes from sources are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
idioms: in_array() and array_search() need strict=true, switch compares loosely, json_decode() needs JSON_THROW_ON_ERROR, tryFrom() over from() for input, and #[\Override] and typed class constants from PHP 8.3. testing: createStub() for doubles that only return values. compatibility: parameter names are call surface since named arguments. Each rule cites php.net, the PHPUnit 12.5 manual, or Symfony's BC promise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Third-person descriptions with quoted example requests, front-loaded, and naming pasted snippets and PHPStan or php-cs-fixer questions. The index routes the new idioms and testing triggers. php-lint-setup also suggests the PHPUnit coverage-strictness switches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviews a webhook check with a loose in_array() and an unchecked json_decode(); grades the findings, the skill trigger, and a read of idioms.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The grader is a trace regex that accepts Read or Grep of the reference, not a tool_used check on Read. CHANGELOG lists twelve eval cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First version of the PHP Coding Plugin (v0.1.0) for Claude Code and Cursor. It teaches AI assistants the PHP rules a clean php-cs-fixer and PHPStan run can still miss, and names the command to run for everything the tools already enforce.
php-coding. A short index routes each change to a command and one of eleven reference files: style (PER Coding Style 3.1), idioms (types, comparisons, exceptions, enums, 8.4 forms, 8.5 hints), testing (PHPUnit 12), security, public-API compatibility, the PSR interfaces, Guzzle, Monolog, OpenTelemetry, Slim 4, and standalone Symfony components. Every rule links a primary source: php.net, php-fig.org, the library's docs, or its source at a release tag./php-lint-setupwrites the reference php-cs-fixer (@PER-CSplusdeclare_strict_types) and PHPStan (level 8,phpVersion: 80400) config without overwriting existing files.php-revieweragent, report-only, loadsphp-codingand cites a reference for each finding.composer.json; format-on-save runs php-cs-fixer on the edited file when a config and binary exist.claude plugin eval.Pins and versions were read on 2026-09-30 and are listed in
AGENTS.md: PHP 8.4 (8.5.11 current), PER 3.1 (the fixer still ships only a 3.0 set), Guzzle 8, Monolog 3, Symfony 8.1, Slim 4.15. Laravel framework code is left to Laravel Boost.Test plan
./scripts/validate.shpasses. It also checks index links, orphan references, the Cursor rule mirror, and the description length limit.claude plugin validate .passes with no warnings.@PER-CS, PHPStan level 8, orcomposer auditalready enforces.style.md.claude plugin eval . --trust-plugin), which measures what the plugin adds.Follow-ups
.php-cs-fixer.phpand fixer binary on every PHP edit. It should be documented, with an opt-out.php-codingdescription is at 1,011 of 1,024 characters.🤖 Generated with Claude Code