source code says Request::getMethod() is deprecated, what to use? |
+1 on not using @deprecated in the docblock when the function as a whole is not deprecated.
phpDocument defines the tag as meaning the element associated with the docblock is deprecated (in this case the method as a whole, not just one of its functionalities): https://docs.phpdoc.org/3.0/guide/refere...deprecated IDEs implement the same logic, leading to the method showing as strike through in the code and other various warnings. For instance in PhpStorm, hovering the method, you do get the detailed comment on the $upper functionality if you read through, but the main message is "Method 'getMethod' is deprecated". ![]() Triggering the wrong warning is never a good strategy. Deprecated warnings are useful when they can lead to a fix. In this case, there is no fix, so you're left with a permanent warning, and the idea that CodeIgniter's code triggers false alarms that you just have to ignore... Never a good thing if awareness is what you want to achieve. |
Welcome Guest, Not a member yet? Register Sign In |