Repository navigation
#164 - Use the PHP 8.3 to 8.5 functions through the Symfony polyfills, and configure Rector accordingly - #165
Merged
Merged
Conversation
…, and configure Rector accordingly * Require symfony/polyfill-php83, symfony/polyfill-php84 and symfony/polyfill-php85 (^1.33). * Rector: withPhpVersion(PHP_82) (was PHP_85) and withPhpSets() without argument (PHP_POLYFILLS set), remove the redundant LevelSetList::UP_TO_PHP_82. No change applied by Rector. * array_last() instead of end() in CleverAgeUiProcessExtensionTest. * Test kernel: lazy ghost proxies with Doctrine ORM 2, now installed by the lowest dependencies job (the legacy proxies cannot unset the readonly properties of the entities). * CONTRIBUTING: new "PHP version" section. CHANGELOG. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 tasks done
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 #164
Description
Port of cleverage/process-bundle#299 (cleverage/process-bundle#300).
Changes
symfony/polyfill-php83,symfony/polyfill-php84andsymfony/polyfill-php85(^1.33). No PHP 8.3+ function was used insrc/ortests/before this PR (nothing relied on transitive polyfills).withPhpVersion(PhpVersion::PHP_82)(wasPHP_85, which allowed Rector to introduce PHP 8.3+ functions without polyfill),withPhpSets()without argument (PHP version read fromcomposer.json, plus Rector'sPHP_POLYFILLSset:JsonValidateRector,ForeachToArrayAny/All/Find/FindKeyRector... apply when the matching polyfill is required), remove the redundantLevelSetList::UP_TO_PHP_82and itsuse.tests/DependencyInjection/CleverAgeUiProcessExtensionTest.php:end($calls)→array_last($calls)(non-empty list, internal pointer not used).src/):HttpProcessExecution::validateContext():json_decode()→json_validate()rejected: the decoded value is used (it must be an array, a JSON scalar is rejected).ProcessSchedule::getContext(),ProcessExecuteController:json_decode()reads the data.reset()/current()/key()/end()(the->end()calls are methods), no foreach searching an element or testing any/all (the loops have side effects: collect messages, log, add schedules...), noucfirst(mb_...)/trim()candidate.--prefer-lowestresolution: it now installs Doctrine ORM 2.20.0 (was ORM 3.6.0), whose legacy proxies cannot unset the readonly properties of the entities (Cannot unset readonly property ProcessExecution::$code from scope Proxies\__CG__\...inLogRecordCrudTest). The test kernel enablesenable_lazy_ghost_objectswith ORM 2, as the Symfony recipe of DoctrineBundle 2 does. Note: an application on ORM 2 without lazy ghost objects has the same problem (pre-existing, unrelated to this PR).Checks
composer update --prefer-lowest, polyfills 1.33.0 installed): OK (403 tests, 2 deprecations frommasterminds/html5, also onmain). Without the test kernel change: 2 errors (see above).--memory-limit=1G): no errors. PHP-CS-Fixer: no change. Rector: no change.Requirements
Breaking changes
None: three new small dependencies (polyfills), no change of the minimum PHP version.
🤖 Generated with Claude Code