Add checks for deprecated method and function calls
@simonhard can you provide a list of deprecated methods, so we can implement the sniffs?
Link issues together to show that they're related. Learn more.
Activity
- Author Owner
If no list is provided, I'll try to find all deprecated methods, based on their annotation inside of the core. Also we might go through the change logs ... or at least through the "Breaking Changes" on https://docs.typo3.org/typo3cms/extensions/core
It would be nice if we can auto generate a file with deprecated functions / methods that will be checked by a single Sniff. Also with a mapping, if possible, like for classes already. This way we can adjust the calls, or at least tell the developer / updater, what to use instead.
- Author Owner
Instead of checking all deprecated annotations inside the code, we should focus on the documented breaking changes, and provide links to each when finding a breaking change in code.
- Author Owner
We should first focus only on the deprecated function / classes and methods. As the title of this issue mentions.
Afterwards we can check whether we want and can cover more parts.
- Author Owner
- We should try to check, at least for static calls, whether the used method is used for the specific class, to not provide warnings where methods with same name but different class are used, e.g. https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.0/Breaking-61822-GetUniqueFieldsFunctionRemoved.html
- Walk through all documented breaking changes and provide at least a warning for the deprecated functions and methods.
- Deprecated functions (not methods) should also work
- Not only check calls, but also definitions? It might be that the user has extended a class or interface and is trying to overwrite a deprecated method?! Moved to #75
Edited by Daniel Siepmann - Daniel Siepmann added status/Backlog label
added status/Backlog label
- Daniel Siepmann mentioned in issue #65 (closed)
mentioned in issue #65 (closed)
- Author Owner
I think functions are not necessary, I didn't use any in years, TYPO3 uses classes to namespace functions, so instead of functions you are using static calls which are already covered.
Still definitions should be possible as long as you extend or implement a class directly, as we are able to fetch the name and do the same comparison.
- Daniel Siepmann added component/PHP label
added component/PHP label
- Daniel Siepmann changed milestone to %0.1.0 alpha
changed milestone to %0.1.0 alpha
- Daniel Siepmann changed time estimate to 1d
changed time estimate to 1d
- Daniel Siepmann added priority/Low label
added priority/Low label
- Daniel Siepmann mentioned in issue #41 (closed)
mentioned in issue #41 (closed)
- Daniel Siepmann removed assignee
removed assignee
- Daniel Siepmann mentioned in issue #75
mentioned in issue #75
- Daniel Siepmann closed
closed
- Daniel Siepmann removed status/Backlog label
removed status/Backlog label
- Daniel Siepmann removed priority/Low label
removed priority/Low label