You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use parse_url() function - phpcs shows me the following error:
39 | WARNING | The use of function parse_url() is discouraged
Is there any reason why I should not use this function?
I don't see any.
Do I have any alternative functions to use?
It was possible to use \Zend\Uri\Http but it's removed starting from Magento 2.4.1.
Can I somehow remove it from the Discouraged function list using a custom ruleset?
Seems like I can't.
Update: I have disabled it using the following sentence, but not sure whether it right way
VladyslavSikailo
changed the title
Is there any reason why function parse_url is Discouraged
Is there any reason why function parse_url is Discouraged?
Jun 3, 2022
When I use parse_url() function - phpcs shows me the following error:
Is there any reason why I should not use this function?
I don't see any.
Do I have any alternative functions to use?
It was possible to use
\Zend\Uri\Http
but it's removed starting from Magento 2.4.1.Can I somehow remove it from the Discouraged function list using a custom ruleset?
Seems like I can't.
Update: I have disabled it using the following sentence, but not sure whether it right way
See: https://github.com/magento/magento-coding-standard/blob/develop/Magento2/Sniffs/Functions/DiscouragedFunctionSniff.php#L103
The text was updated successfully, but these errors were encountered: