-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Deprecated method does not point to replacement #24107
Comments
This one is a weird case of picking up a deprecation because the parent class is deprecated. When JDatabaseDriver was introduced, it was made a subclass of JDatabase to not create as many B/C issues in changing from the old structure of the database API (think Joomla 2.5) to the redesigned structure. So JDatabase is deprecated, and inherently everything in that parent class is too. The docs parser sees the parent element as deprecated and marks children deprecated as well. If you go to the source file, it's not marked deprecated. This should be closed as a won't fix, the source code is correct and the odds of someone (me) finding time to either make the phpDocumentor rendering account for this odd case scenario or rewrite the API docs engine in full (also accounting for this odd case scenario) are slim to none. |
So it is not deprecated? |
Just close the issue if so. |
The source code says it is not deprecated. Like I said, it is a quirk with the doc parser and the odds of the parser quirk being dealt with are not good. |
Is the doc parser here on github? |
@olleharstedt you can close your own Issue yourself. |
It's phpDocumentor, the template can be found at https://github.com/joomla/api.joomla.org |
Thanks. |
@olleharstedt if you work on this would you please make the new referenced item a link i.e. " |
Trying to make all the class names links requires changing the inline doc blocks in the source code and IMO worsens readability because you have to wrap everything in a special tag and hope it gets processed, i.e. /**
* Class constructor.
*
* @param Input $input An optional argument to provide dependency injection for the application's
* input object. If the argument is a JInput object that object will become
* the application's input object, otherwise a default input object is created.
* @param Registry $config An optional argument to provide dependency injection for the application's
* config object. If the argument is a Registry object that object will become
* the application's config object, otherwise a default config object is created.
* @param WebClient $client An optional argument to provide dependency injection for the application's
* client object. If the argument is a WebClient object that object will become
* the application's client object, otherwise a default client object is created.
* @param ResponseInterface $response An optional argument to provide dependency injection for the application's
* response object. If the argument is a ResponseInterface object that object
* will become the application's response object, otherwise a default response
* object is created.
*/
// Updated, this becomes...
/**
* Class constructor.
*
* @param Input $input An optional argument to provide dependency injection for the application's
* input object. If the argument is a {@link \Joomla\Input\Input} object
* that object will become the application's input object, otherwise a
* default input object is created.
* @param Registry $config An optional argument to provide dependency injection for the application's
* config object. If the argument is a {@link \Joomla\Registry\Registry} object
* that object will become the application's config object, otherwise a default
* config object is created.
* @param WebClient $client An optional argument to provide dependency injection for the application's
* client object. If the argument is a {@link \Joomla\Application\Web\WebClient}
* object that object will become the application's client object, otherwise a
* default client object is created.
* @param ResponseInterface $response An optional argument to provide dependency injection for the application's
* response object. If the argument is a
* {@link \Psr\Http\Message\ResponseInterface} object that object will become
* the application's response object, otherwise a default response object is created.
*/ |
Steps to reproduce the issue
Expected result
When a method is deprecated, the documentation should contain information about what to use instead, e.g. a
@see
tag.Actual result
No such info. https://api.joomla.org/cms-3/classes/JDatabaseDriver.html#method_getInstance
The method is deprecated, but how to know what to use instead?
System information (as much as possible)
Additional comments
The text was updated successfully, but these errors were encountered: