-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add description why php functions marked as discouraged and give alternatives #102
Comments
Totally agree. I wanted to follow the rules but sometimes it's hard to find an alternative function. Usually, my approach is searching for that function in the whole vendor/magento folder, see if the Core team use it else where in the code. If I can't find it, I got stuck. I also know that some are just warning, it is there to help developers mind the usage of the function, for example |
You can use |
Hi @diazwatson,
Looks really good! Thank you! However it adds alternative only for one function. Are you interested in adding such documentation? |
Sure, np I will add those |
@ihor-sviziev I just reviewed the list of Also not all of them have an equivalent or wrapper in Magento. Anyway I have added some more alternatives for discouraged functions |
#102 Add alternative for php pathinfo function is discouraged
Keep this for future recommendations enhancement. |
Preconditions
N/A
Steps to reproduce
Expected result
The use of function pathinfo() is discouraged
isn't clean enoughGood example: https://github.com/extdn/extdn-phpcs/blob/master/Extdn/Sniffs/Classes/StrictTypesSniff.md
Actual result
Errors is quite clear, but not warnings
Related question on stack overflow, answer not seems to me correct.
https://magento.stackexchange.com/questions/192978/the-use-of-function-pathinfo-is-discouraged-magento-2
The text was updated successfully, but these errors were encountered: