-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[4.3] Remove unused local variables #34176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.3] Remove unused local variables #34176
Conversation
44bcd6f
to
3783a60
Compare
fabbot changes should not be applied. |
src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php
Outdated
Show resolved
Hide resolved
@@ -121,7 +121,7 @@ static function (\$condition, \$context, \$request) { // \$checkCondition | |||
} | |||
} | |||
EOF; | |||
$compiledRoutes[4] = $forDump ? $checkConditionCode .= ",\n" : eval('return '.$checkConditionCode.';'); | |||
$compiledRoutes[4] = $forDump ? $checkConditionCode.",\n" : eval('return '.$checkConditionCode.';'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen this updated in the previous PR also and still merged - but FYI this is not exactly the same: using .=
provides better memory usage (maybe the engine does the optimization already, I don't know).
But ok to change anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. I assumed a simple concat is faster than an assign + concat. It might worth it to take a look or to revert those changes. I don't want to cause a performance regression just by trying to "clean" the code.
3783a60
to
7d8897c
Compare
7d8897c
to
58161b8
Compare
Thank you @fancyweb. |
This PR was merged into the 4.3 branch. Discussion ---------- [4.3] Remove unused local variables | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Follow up of #34105 on 4.3. Commits ------- 58161b8 [4.3] Remove unused local variables
This PR was merged into the 4.3 branch. Discussion ---------- [4.3] Remove unused local variables | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Follow up of symfony#34105 on 4.3. Commits ------- 58161b8 [4.3] Remove unused local variables
Follow up of #34105 on 4.3.