Closed
Conversation
markstory
reviewed
Oct 14, 2025
Comment on lines
+15
to
+19
|
|
||
| ?> | ||
| ----- | ||
| <?php | ||
|
|
Member
There was a problem hiding this comment.
Does this actually work? How do we update the contents of these files? With the current separate file setup we have in some tests one can use UPDATE_TEST_COMPARISON_FILES=1 to regenerate the baseline files.
Member
Author
There was a problem hiding this comment.
The test automatically:
- Reads all .php.inc files from the Fixture directory (line 21 in the test)
- Splits each file on the ----- separator
- Applies the Rector rule to the "before" code
- Asserts that the result matches the "after" code
so I guess it does
Member
Author
|
@LordSimal we should actually backport those to 5.3 right? |
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.
Implement some more of https://github.com/cakephp/docs/blob/6.x/en/appendices/6-0-migration-guide.rst
Overview
Three new Rector rules have been implemented to automate CakePHP 6.0 migration changes that were previously not covered.
1. RequestQueryParamRector
File:
src/Rector/Rector/MethodCall/RequestQueryParamRector.phpPurpose: Replace
$request->getParam('?')with$request->getQueryParams()Migration Guide Reference: Section 2.3 - Query Parameter Access Change
What it does:
$request->getParam('?')calls onCake\Http\ServerRequestinstances$request->getQueryParams()(no arguments)'?'Example:
2. TextInsertPlaceholderRector
File:
src/Rector/Rector/MethodCall/TextInsertPlaceholderRector.phpPurpose: Replace
:placeholderwith{placeholder}inText::insert()callsMigration Guide Reference: Section 2.4 - Text::insert() Placeholder Format Change
What it does:
Text::insert()static calls:nameto{name}in template strings'before'or'after'options are explicitly set/:(\w+)/to match placeholders (word characters only)Example:
3. RenameFormHelperTemplateKeyRector
File:
src/Rector/Rector/String_/RenameFormHelperTemplateKeyRector.phpPurpose: Rename
'multicheckboxTitle'to'multicheckboxLabel'in FormHelper template configurationsMigration Guide Reference: Section 2.6 - FormHelper Template Key Rename
What it does:
'multicheckboxTitle''multicheckboxLabel'Example: