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
Function key() is removed.
Consider replace with use with objects is deprecated()
Function reset() is removed.
Consider replace with use with objects is deprecated()
Function end() is removed.
Consider replace with use with objects is deprecated()
There may be other similar functions producing this error as well. These are the ones I had in my code base.
The text was updated successfully, but these errors were encountered:
This is from PHP 8.1, and it's a strange one, because it's only deprecated if an object, rather than an array is supplied. But this tool doesn't know what you're feeding it.
I think it's worth checking that you're only supplying arrays to these functions. Then there's an option to --skip-checks, so you can use something like: phpdd scan --skip-checks reset,end PATH
I think the problem is the wording from the tool: 'Function XXXX() is removed'.
The function is not removed from PHP. The function isnt even deprecated as a whole - only a specific use case is deprecated.
This should be a warning and not an error outright.
Then the second line "Consider replace with use with objects is deprecated()" is not gramatically correct so reading it several times over is still confusing as to what its telling the user to do.
I believe the intent was to say that the 'use with objects is deprecated' as an note/warning, but instead its being presented as a replacement consideration.
The main line should be replaced with something like
'Function XXX() use with objects is deprecated.'
The above code falsely produces errors:
There may be other similar functions producing this error as well. These are the ones I had in my code base.
The text was updated successfully, but these errors were encountered: