Skip to content

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

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

njoubert-cleverage merged 1 commit into
mainfrom
52

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Fixes #52

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; withPhpSets() without explicit version (read from composer.json, adds Rector's PHP_POLYFILLS set); remove the redundant LevelSetList::UP_TO_PHP_82 and its use.
  • Rector rules applied: none (the dry-run with the new configuration reports no change).
  • Pre-existing uses of PHP 8.3+ functions in src/ and tests/: none, so nothing currently relied on a transitive polyfill.
  • Manual replacements: none. The whole of src/ was reviewed, no candidate:
    • no reset() / current() / end() / key() on arrays, no $a[array_key_first($a)]: the only current() / next() calls (DoctrineReaderTask) are \Iterator methods on the query result iterator, not array functions;
    • the foreach loops (AbstractDoctrineQueryTask criteria / order by, DoctrineBatchWriterTask, CleverAgeDoctrineProcessExtension) have side effects (query builder, persist / flush, service loading), they do not search an element nor test any / all;
    • no json_decode, trim, ucfirst, str_pad usage.
  • CONTRIBUTING.md: new "PHP version" section.
  • CHANGELOG.md: entry in the "Latest" section.

Checks

  • PHPUnit (PHP 8.5, highest): OK (81 tests, 289 assertions); with coverage (pcov), no risky test, lines 100% (286/286).
  • PHPUnit lowest (PHP 8.2, composer update --prefer-lowest): OK (81 tests, 289 assertions), symfony/polyfill-php83, -php84 and -php85 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 (^1.33), as cleverage/process-bundle#299.
- Rector: withPhpVersion(PHP_82) instead of PHP_85, withPhpSets() without
  explicit version (adds the PHP_POLYFILLS set), remove the redundant
  LevelSetList::UP_TO_PHP_82.
- No Rector rule applies and no manual replacement is relevant to the
  current code.
- Document the PHP version policy in CONTRIBUTING.md, update CHANGELOG.

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