Skip to content

chore: Bump to php 8.4 and upgrade Pest - #11

Open
tymondesigns wants to merge 3 commits into
mainfrom
chore/upgrade-pest
Open

tymondesigns wants to merge 3 commits into
mainfrom
chore/upgrade-pest

Conversation

@tymondesigns

@tymondesigns tymondesigns commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

This pull request updates the package to require PHP 8.4+, modernizes the development toolchain, and improves test and documentation consistency. It removes support for PHP 8.3, updates dependencies and CI configuration, and refactors tests and documentation for clarity and alignment with current best practices.

PHP version and dependency updates:

  • Require PHP 8.4+ throughout the codebase, including composer.json, documentation, and CI workflows. This removes support for PHP 8.3 and ensures consistency in requirements. [1] [2] [3] [4] [5] [6]
  • Update development dependencies to latest major versions (e.g., Pest 5.x, Pest plugins, symplify/easy-coding-standard), and add Pest PHPStan integration. [1] [2]

Tooling and configuration improvements:

  • Update code style and static analysis configurations to target PHP 8.4 and include new Pest and Rector sets. [1] [2] [3] [4]
  • Run tests in parallel by default via the composer test script.

Testing improvements:

Documentation consistency:

  • Update all code examples in documentation to use direct instantiation of JsonRepairer (i.e., new JsonRepairer(...) instead of (new JsonRepairer(...))) for clarity and consistency. [1] [2] [3] [4] [5]

Bug fix:

  • Fix a logic bug in removeComments to correctly detect the end of multi-line comments.

@tymondesigns tymondesigns changed the title chore: Upgrade Pest chore: Bump to php 8.4 and ppgrade Pest Aug 2, 2026
@tymondesigns tymondesigns changed the title chore: Bump to php 8.4 and ppgrade Pest chore: Bump to php 8.4 and upgrade Pest Aug 2, 2026
@tymondesigns
tymondesigns marked this pull request as ready for review August 2, 2026 21:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The advertised parser fix is behaviorally unchanged, and the default test command is not portable to native Windows.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Updates the package baseline to PHP 8.4, modernizes Pest/tooling, and refactors tests and documentation.

Changes:

  • Raises PHP and development dependency requirements.
  • Migrates tests and tooling to Pest 5 and PHP 8.4 conventions.
  • Attempts to fix multi-line comment removal.
File Description
composer.json Updates requirements and test scripts.
src/​Concerns/​InputSanitization.php Changes comment terminator condition.
tests/​Pest.php Migrates Pest bootstrap API.
tests/​Unit/​ApiUsageTest.php Refactors API expectations.
tests/​Unit/​EdgeCasesTest.php Refactors edge-case expectations.
tests/​Unit/​JsonRepairsTest.php Refactors repair expectations.
tests/​Unit/​LoggingTest.php Refactors logging expectations.
tests/​Unit/​OptionsTest.php Refactors option expectations.
tests/​Unit/​StreamingJsonRepairerTest.php Refactors streaming expectations.
tests/​Unit/​ValuesAndStructuresTest.php Refactors value expectations.
rector.php Targets PHP 8.4 and Pest rules.
phpstan.dist.neon Adds Pest integration and test analysis.
ecs.php Enables PHP 8.4 migration rules.
README.md Updates requirements and examples.
docs/​json-repair/​configuration.mdx Modernizes instantiation examples.
docs/​json-repair/​installation.mdx Updates PHP requirement.
docs/​json-repair/​quickstart.mdx Modernizes instantiation example.
.github/​workflows/​run-tests.yml Updates the PHP test matrix.
.github/​workflows/​benchmark.yml Benchmarks with PHP 8.4.
.github/​actions/​setup-php-composer/​action.yml Defaults setup to PHP 8.4.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread composer.json Resolved
$i += 2;

while ($i + 1 < $length && ! ($input[$i] === '*' && $input[$i + 1] === '/')) {
while ($i + 1 < $length && ($input[$i] !== '*' || $input[$i + 1] !== '/')) {
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.

2 participants