Repository navigation
Require PHP 8.4, fix GlobalExceptionSniff, clean up tooling - #15
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fix `<rul>` typo in ruleset so DNFTypeHintFormat is actually applied - Require PHP ^8.4 and PHPUnit ^13.4, test PHP 8.4 and 8.5 in CI - Remove broken `composer tests` script - Update PHPUnit config schema to 13.4 - Use correct standard name `Brainbits` in README, drop Docker section - Remove unmaintained CHANGELOG.md - Update CLAUDE.md accordingly Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Watch composer dependencies via Dependabot (major bumps only) - Group GitHub Actions updates into one PR - Remove unused renovate.json Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Register on T_THROW and only inspect `throw new <Class>`, so `throw $e` no longer reports an unrelated class name further down the file - Resolve names via namespace and use statements: unqualified names in the global namespace, qualified and relative names are handled correctly - Compare class names case-insensitively - Report on the class name and use the resolved name in the message - Use typed constants and native parameter types (PHP 8.4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ChangedFromDoctrineCodingStandard.php was not valid PHP and therefore did not test anything; it now covers all excluded Doctrine rules - Remove exclusion of UnionTypeHintFormat (no longer used by Doctrine 14) and the DNFTypeHintFormat reference (already configured by Doctrine) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Include tests/ in phpcs.xml.dist (without fixtures) and run it in CI - Require slevomat/coding-standard ^8.23 (minimum of doctrine 14) - Drop no-op --no-suggest, ignore .phpunit.cache, clean PHPUnit config - Update CLAUDE.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add MIT license text (composer.json already declares MIT) - README: describe the standard, differences to Doctrine, the custom GlobalException sniff and the development workflow - Remove unused example/ and docs/ files from 2017/18 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review findings on the Slevomat based name resolution:
- Files with several namespaces used the imports of another namespace
- Code inside `namespace { }` was resolved against a "{" namespace
- Group uses were ignored and resolved against the global namespace
- `throw (new Exception())` was not reported anymore
Imports are now collected per namespace block, including group uses and
skipping function/const imports. Parentheses after throw are skipped.
Errors are reported on the throw token again, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cache the actual composer cache dir, ~/.composer/cache does not exist on the runner and nothing was cached - Separate cache keys for lowest and highest dependencies - Read-only GITHUB_TOKEN Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Doc comments are tokenized as T_DOC_COMMENT_* tokens and ended up in the
parsed import name, e.g. `use Foo\{ /** doc */ Exception };`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
|
🎉 This PR is included in version 8.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Changes
GlobalExceptionSniff
throw new <Class>(parentheses afterthroware skipped);throw $eno longer reports an unrelated class name further down the filenamespace { }, aliases, group uses (use Foo\{Bar, Baz as Qux}),namespace\relative names;use function/use constare ignoredthrow new Exception()in the global namespace is now reportedthrowtokenthrow $e,throw new $class, anonymous classes,throw X::create()throw new Exception()in files without namespace.Ruleset
UnionTypeHintFormatexclusion (not used by Doctrine 14 anymore) and theDNFTypeHintFormatreference (already configured by Doctrine 14, the former<rul>typo had no effect)ChangedFromDoctrineCodingStandard.phpintegration input was invalid PHP and tested nothing; it now covers all excluded Doctrine rules (Doctrine reports 4 violations, Brainbits 0)PHP 8.4 / dependencies
"php": "^8.4", PHPUnit^13.4,slevomat/coding-standard^8.23(minimum of Doctrine 14)--no-suggest; run self-checkvendor/bin/phpcsin CI~/.composer/cachedid not exist, nothing was cached), separate cache keys for lowest/highest, read-onlyGITHUB_TOKENphpcs.xml.distnow also checkstests/(without fixtures/inputs).phpunit.cacheignoredcomposer testsscriptDependabot / Renovate
fix(deps)/chore(deps)), group GitHub Actions updates;dependencieslabel now exists in the reporenovate.jsonDocs
Brainbits, describe differences to Doctrine and the custom sniff precisely, development section; drop Docker sectionLICENSE, addCLAUDE.mdCHANGELOG.mdand outdatedexample//docs/filesTests
Locally on PHP 8.5 with highest and lowest dependencies: PHPUnit (14 tests), ruleset integration report and self-check green.
🤖 Generated with Claude Code