Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Conversation

fancyweb
Copy link
Contributor

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.

@fancyweb fancyweb force-pushed the all-remove-unused-local-variables-in-tests-43 branch from 44bcd6f to 3783a60 Compare October 29, 2019 18:38
@fancyweb
Copy link
Contributor Author

fancyweb commented Oct 29, 2019

fabbot changes should not be applied.

@nicolas-grekas nicolas-grekas added this to the 4.3 milestone Oct 30, 2019
@@ -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.';');
Copy link
Member

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.

Copy link
Contributor Author

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.

@fancyweb fancyweb force-pushed the all-remove-unused-local-variables-in-tests-43 branch from 3783a60 to 7d8897c Compare October 30, 2019 12:46
@fancyweb fancyweb force-pushed the all-remove-unused-local-variables-in-tests-43 branch from 7d8897c to 58161b8 Compare October 30, 2019 12:58
@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

nicolas-grekas added a commit that referenced this pull request Oct 30, 2019
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
@nicolas-grekas nicolas-grekas merged commit 58161b8 into symfony:4.3 Oct 30, 2019
@fancyweb fancyweb deleted the all-remove-unused-local-variables-in-tests-43 branch October 30, 2019 13:25
hultberg pushed a commit to hultberg/symfony that referenced this pull request Sep 17, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants