Skip to content

Add CI: PHPUnit, PHPStan and PSR-12 - #1

Merged
ellisgl merged 1 commit into
mainfrom
add-ci
Nov 25, 2026
Merged

ellisgl merged 1 commit into
mainfrom
add-ci

Conversation

@ellisgl

@ellisgl ellisgl commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Adds a GitHub Actions workflow that runs on every push to main and on pull requests.

Tests: PHPUnit on PHP 8.3–8.5
Quality: PHPStan level 6 and PHP_CodeSniffer (PSR-12), on PHP 8.5

To get CI passing from the first run:

  • Added array value types to the trie docblocks, removed a duplicated docblock on collect(), and handled a possible false from strrpos() when building the short form of an optional route. Behavior is unchanged.
  • Fixed two PSR-12 issues: brace spacing in MethodNotAllowedException and a missing newline at the end of Router.php.
  • Added PHPStan 2.x and PHP_CodeSniffer as dev dependencies, with composer phpstan and composer phpcs scripts.
  • Added CI, Packagist, PHP version and PHPStan badges to the README.

All checks pass locally on PHP 8.5.

🤖 Generated with Claude Code

- Run PHPUnit across every supported PHP version up to 8.5
- Run PHPStan (level 6) and PHP_CodeSniffer (PSR-12) on PHP 8.5
- Upgrade PHPStan to 2.x (1.x crashes on PHP 8.5)
- Fix the issues PHPStan and PHPCS reported
- Replace stale Scrutinizer/Travis badges with CI and Packagist badges

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ellisgl
ellisgl merged commit 6d7b603 into main Nov 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant