Fix downgrade error: namespace Foreach should be Foreach_#6045
Merged
samsonasik merged 5 commits intomainfrom Jun 26, 2024
Merged
Fix downgrade error: namespace Foreach should be Foreach_#6045samsonasik merged 5 commits intomainfrom
samsonasik merged 5 commits intomainfrom
Conversation
Member
Author
|
@nikolicaleksa the test somehow error now: There was 1 failure:
1) Rector\Tests\CodingStyle\Rector\Foreach_\MultiDimensionalArrayToArrayDestructRector\MultiDimensionalArrayToArrayDestructRectorTest::test with data set #1 ('/Users/samsonasik/www/rector-...hp.inc')
Failed on fixture file "foreach_with_multidimensional_associative_array_variable_used.php.inc"
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
*/
public function run1(array $users)
{
- foreach ($users as ['id' => $id, 'name' => $name, 'email' => $email1]) {
+ foreach ($users as ['id' => $id, 'name' => $name, 'email' => $email]) {
echo $id;
echo sprintf('Name: %s', $name);
- foreach ($email1 as $email) {
+ foreach ($email as $email) {
echo $email;
}
} |
Member
Author
|
I see, rectify seems cause invalid rename variable, resolved at 1666243 |
Member
Author
|
All checks have passed 🎉 @TomasVotruba I am merging it ;) |
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.
Ref #6031 (comment)
Ref https://github.com/rectorphp/rector-src/actions/runs/9677982386/job/26700762713#step:14:66
Ref https://3v4l.org/TbPbV#v7.2.34
from PR;