Repository navigation
#56 - Use the PHP 8.3 to 8.5 functions through the Symfony polyfills, and configure Rector accordingly - #57
Merged
Merged
Conversation
…olyfills, and configure Rector accordingly * Require symfony/polyfill-php83, symfony/polyfill-php84 and symfony/polyfill-php85 (cleverage/process-bundle#299) * Rector: withPhpVersion(PHP_82) instead of PHP_85, withPhpSets() read from composer.json (adds the PHP_POLYFILLS set), remove the redundant LevelSetList::UP_TO_PHP_82 * No Rector rule applied, no manual replacement needed in the current code * CONTRIBUTING: add a "PHP version" section * Update CHANGELOG Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #56
Description
Same change as cleverage/process-bundle#299: the bundle supports PHP 8.2 and later, but Rector targeted PHP 8.5 (
withPhpVersion(PhpVersion::PHP_85)) and could introduce PHP 8.3+ functions working on PHP 8.2 only thanks to transitively installed polyfills.Changes
composer.json: requiresymfony/polyfill-php83,symfony/polyfill-php84andsymfony/polyfill-php85(^1.33).rector.php:withPhpVersion(PhpVersion::PHP_82)instead ofPHP_85;withPhpSets()without argument (read fromcomposer.json, adds Rector'sPHP_POLYFILLSset: the rules using a newer function apply when its polyfill is required); remove the redundantLevelSetList::UP_TO_PHP_82and itsuse.vendor/bin/rector --dry-runreports no change with the new configuration).src/andtests/: none.src/: no replacement applies. Candidates reviewed and kept:Client::constructUri()ltrim($url, '/'): an explicit character list,mb_ltrim()would bring nothing (and has different semantics: no..ranges).RegisterClientsPass::process()andCleverAgeRestProcessExtension::findServices()foreach: loops with side effects on every element, not a search / any / all (noarray_find()/array_any()/array_all()).Client::replaceParametersInUri()array_walk()/array_map()/array_values(): builds the replacement lists, no PHP 8.3+ function fits.reset()/current()/end()/key(), nojson_decode()(the response body is output as a string), noucfirst()/str_pad()in the code.CONTRIBUTING.md: new "PHP version" section.CHANGELOG.md: entry in the "Latest" section.Checks
--prefer-lowest, PHP 8.2): OK (33 tests, 105 assertions),symfony/polyfill-php83/84/85installed (v1.33.0).Requirements
Breaking changes
None: three new small dependencies (polyfills), no change of the minimum PHP version.
🤖 Generated with Claude Code