Skip to content

Add CI: PHPUnit (with MySQL), PHPStan and PSR-12 - #9

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

ellisgl merged 1 commit into
releasefrom
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 release and on pull requests.

Tests: PHPUnit on PHP 8.1–8.5, against a MySQL 8.4 service
Quality: PHPStan level 8 and PHP_CodeSniffer (PSR-12), on PHP 8.5

To get CI passing from the first run:

  • Removed three always-true checks in MySQLDateTimeBindings::bDateTime() and MySQLLogicBindings. Earlier branches already guarantee them, so behavior is unchanged.
  • Corrected the bFloat() return type from array{?string} to array{string}. It returns the string NULL, never PHP null.
  • Upgraded PHPStan from 1.x to 2.x. PHPStan 1.x crashes on PHP 8.5.
  • Replaced the Scrutinizer/Travis badges, which no longer update, with CI, Packagist, PHP version and PHPStan badges.

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 8) 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 c0ff1ec into release Nov 25, 2026
7 of 8 checks passed
@ellisgl
ellisgl deleted the add-ci branch November 25, 2026 14:13
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