-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Cast types instead of function #735
Conversation
What is the motivation/benefit of making this change? |
These functions are "forbidden" in EQP standard, so they should not be used in core too. Just codestyle fixes. |
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 am voting against this PR. I would change to cast types when theese PHP functions is at least deprecated.
@sreichel You talking about this repository https://github.com/magento/marketplace-eqp? I think, that these changes are pointless. There is no bug fixes, no performance improvments....but too many changes. |
@midlan the functions will not deprecate, because of additional features (at least intval() & strval()). @Sekiphp to many changes for what? I do not believe thery will be big code changes anyymore, that could cause merge conflicts. I dont think its pointless. What's wrong with consistent code? Magento 2 replaced all PHP function with typecasting. Btw ... typecasting is much more faster (i know benchmarks vs real usage) |
a few things.
benchmark case for PHP 7.1: https://stackoverflow.com/questions/1912599/is-there-any-particular-difference-between-intval-and-casting-to-int-int-x |
app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php
Outdated
Show resolved
Hide resolved
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.
fix TravisCI error (one opening Parenthesis was not removed)
I scanned through and didn't see any errors, but what method did you use to make this change, was it manual or automated? Did you account for cases like this? intval($a * $b) // original
(int)$a * $b // incorrect
(int)($a * $b) // correct |
Thanks @colinmollenhour . Good point. I manually checked all edit, but also missed that opening parenthesis) Update tomorrow. |
@sreichel can you bring the patch back to life? |
IMHO it looks good. I'd prefer the other PRs get merge and let this open (for now). |
ok |
Something went wrong .... i'll create a new one. |
No description provided.