Skip to content

Restore CI for PHP 7.1+ with versioned PHPUnit configs and PHPStan cleanup#52

Merged
voku merged 10 commits intomasterfrom
copilot/fix-github-ci-errors
Apr 22, 2026
Merged

Restore CI for PHP 7.1+ with versioned PHPUnit configs and PHPStan cleanup#52
voku merged 10 commits intomasterfrom
copilot/fix-github-ci-errors

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 22, 2026

  • Fix phpunit.xml.dist (PHPUnit 9+) - exclude JsonSerializableReturnTypeTraitPhp81.php from coverage scan
  • Fix phpunit.legacy.xml.dist (PHPUnit 8) - same exclusion added to whitelist/exclude

This change is Reviewable

Copilot AI and others added 4 commits April 22, 2026 02:04
Agent-Logs-Url: https://github.com/voku/Stringy/sessions/ab96a171-0cfe-4ebc-bd6a-9b52ff092f05

Co-authored-by: voku <264695+voku@users.noreply.github.com>
Agent-Logs-Url: https://github.com/voku/Stringy/sessions/c994b095-7d56-4d26-ab6a-452e4181411e

Co-authored-by: voku <264695+voku@users.noreply.github.com>
Agent-Logs-Url: https://github.com/voku/Stringy/sessions/c994b095-7d56-4d26-ab6a-452e4181411e

Co-authored-by: voku <264695+voku@users.noreply.github.com>
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 22, 2026

Coverage Status

Coverage is 97.891%copilot/fix-github-ci-errors into master. No base build found for master.

@voku voku marked this pull request as ready for review April 22, 2026 02:19
@voku
Copy link
Copy Markdown
Owner

voku commented Apr 22, 2026

@copilot will the Stringy::jsonSerialize() change trigger a deprecated notice or something like that on newer php versions? If yes, how to handle that?

Copy link
Copy Markdown
Author

Copilot AI commented Apr 22, 2026

@copilot will the Stringy::jsonSerialize() change trigger a deprecated notice or something like that on newer php versions? If yes, how to handle that?

Yes — without extra handling PHP 8.1+ emits a deprecation for JsonSerializable::jsonSerialize() when the return type is omitted. I fixed that in 0611d9e: PHP 7.1 still uses the plain implementation, while PHP 8.1+ loads a small compatibility trait that adds #[\ReturnTypeWillChange], so newer runtimes stay quiet without breaking old ones. I also rechecked it with E_ALL, the focused testJsonEncode PHPUnit run, and phpstan.

Copilot finished work on behalf of voku April 22, 2026 11:56
@voku voku merged commit e61047c into master Apr 22, 2026
18 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.

3 participants