Skip to content

#50 - Use the PHP 8.3 to 8.5 functions through the Symfony polyfills, and configure Rector accordingly - #51

Merged
njoubert-cleverage merged 1 commit into
mainfrom
50
Oct 15, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
50

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Fixes #50

Description

Same change as cleverage/process-bundle#299 (PR cleverage/process-bundle#300).

Changes

  • composer.json: require symfony/polyfill-php83, symfony/polyfill-php84 and symfony/polyfill-php85 (^1.33).
  • rector.php: ->withPhpVersion(PhpVersion::PHP_82) instead of PHP_85 (the bundle supports PHP >= 8.2, Rector could introduce PHP 8.3+ functions without polyfill); ->withPhpSets() without argument instead of withPhpSets(php82: true), which adds Rector's PHP_POLYFILLS set (the rules using a newer function apply when the matching polyfill is required); remove the redundant LevelSetList::UP_TO_PHP_82 and its use.
  • Rector rules applied: none (rector --dry-run reports no change with the new configuration).
  • Manual replacements: none. src/ has no reset()/current()/end()/key(), no json_decode(), no trim(). Rejected candidates:
    • Client::call() ucfirst($method) → mb_ucfirst(): not identical for non-ASCII method names (byte-based vs multibyte), and PHP method names built from it are byte strings anyway.
    • SoapCallOptionsTrait foreach ($headers ...), RegisterClientsPass and CleverAgeSoapProcessExtension loops: they build/register every element, no search or any/all test, so array_find()/array_any()/array_all() don't apply.
  • Pre-existing uses of PHP 8.3+ functions in src/ and tests/: none.
  • CONTRIBUTING.md: new "PHP version" section.
  • CHANGELOG.md: entry in "Latest".

Checks

  • PHPUnit (PHP 8.5, highest): OK (34 tests, 101 assertions); with pcov coverage: OK, no risky test, lines 100% (172/172).
  • PHPUnit lowest (--prefer-lowest, PHP 8.2 with ext-soap): OK (34 tests, 101 assertions), the three polyfills installed.
  • PHPStan: no errors. PHP-CS-Fixer: 0 files fixed. Rector: no change.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None: three new small dependencies (polyfills), no change of the minimum PHP version.

🤖 Generated with Claude Code

…olyfills, and configure Rector accordingly

* Require symfony/polyfill-php83, symfony/polyfill-php84 and symfony/polyfill-php85 (cleverage/process-bundle#299)
* Rector: PHP 8.2 instead of 8.5 (the minimum version of the bundle), withPhpSets() without argument to add the polyfills set, remove the redundant LevelSetList::UP_TO_PHP_82
* No code change: no Rector rule applies, no manual replacement keeps an identical behaviour
* Document the PHP version rule in CONTRIBUTING.md, update CHANGELOG.md

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 485b2d2 into main Oct 15, 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.

Use the PHP 8.3 to 8.5 functions through the Symfony polyfills, and configure Rector accordingly

1 participant