-
-
Notifications
You must be signed in to change notification settings - Fork 60
add PhpDoc @deprecated #1592
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
base: master
Are you sure you want to change the base?
add PhpDoc @deprecated #1592
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds @deprecated PHPDoc tags to various functions, methods, and classes throughout the codebase to mark them as deprecated. This improves code documentation by signaling to developers which APIs should no longer be used.
- Marks multiple legacy functions and methods as deprecated across 16 files
- Adds missing PHPDoc blocks where needed to include deprecation notices
- Updates existing documentation blocks with deprecation tags
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| htdocs/register.php | Marks userCheck() function as deprecated |
| htdocs/kernel/module.php | Adds deprecation tags to 17 module-related methods |
| htdocs/include/old_theme_functions.php | Marks legacy theme functions as deprecated and adds missing PHPDoc block |
| htdocs/include/functions.legacy.php | Marks 6 legacy functions as deprecated with documentation updates |
| htdocs/include/cp_functions.php | Deprecates xoops_module_write_admin_menu() function |
| htdocs/class/xoopstopic.php | Marks entire XoopsTopic class as deprecated |
| htdocs/class/xoopsload.php | Deprecates XoopsLoad::load() static method |
| htdocs/class/xoopseditor/xoopseditor.php | Marks render() method as deprecated |
| htdocs/class/xoopscomments.php | Deprecates entire XoopsComments class |
| htdocs/class/template.php | Adds deprecation tags to 28 template methods |
| htdocs/class/module.textsanitizer.php | Marks addSlashes() method as deprecated |
| htdocs/class/module.errorhandler.php | Deprecates entire ErrorHandler class |
| htdocs/class/model/read.php | Marks 2 data access methods as deprecated |
| htdocs/class/errorhandler.php | Deprecates XoopsErrorHandler class |
| htdocs/class/database/database.php | Marks queryF() legacy alias as deprecated |
| htdocs/Frameworks/art/functions.user.php | Deprecates 3 user-related functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * @param string $module | ||
| * @param string $default | ||
| * @return bool | ||
| * @deprecated |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The @deprecated tag should follow PHPDoc standards with additional information. According to PHPDoc standards, the @deprecated tag should include a version number and optionally a description or replacement suggestion. For example: @deprecated since version X.X.X Use alternativeFunction() instead.
Consider adding more context like:
* @deprecated since version X.X.X Use <alternative> instead.This applies to all deprecated items in this file.
| * | ||
| * @param string $content | ||
| * @return bool | ||
| * @deprecated |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The @deprecated tag should follow PHPDoc standards with additional information. According to PHPDoc standards, the @deprecated tag should include a version number and optionally a description or replacement suggestion. For example: @deprecated since version X.X.X Use alternativeFunction() instead.
This applies to all deprecated items in this file.
| * @deprecated | |
| * @deprecated since version 2.5.0 This function is deprecated and should not be used. No replacement available. |
| * @package kernel | ||
| * @subpackage comments | ||
| * @access public | ||
| * @deprecated |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The @deprecated tag should follow PHPDoc standards with additional information. According to PHPDoc standards, the @deprecated tag should include a version number and optionally a description or replacement suggestion. For example: @deprecated since version X.X.X Use AlternativeClass instead.
This applies to all deprecated items in this file.
| * @deprecated | |
| * @deprecated since 2.5.4 Use \XoopsComment in /kernel/comment.php instead. |
| * @author Kazumi Ono <onokazu@xoops.org> | ||
| * @author John Neill <catzwolf@xoops.org> | ||
| * @copyright (c) 2000-2025 XOOPS Project (https://xoops.org) | ||
| * @deprecated |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The @deprecated tag should follow PHPDoc standards with additional information. According to PHPDoc standards, the @deprecated tag should include a version number and optionally a description or replacement suggestion. For example: @deprecated since version X.X.X Use AlternativeClass instead.
This applies to all deprecated items in this file.
| * @deprecated | ||
| */ |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent formatting: the asterisk (*) should be aligned with other PHPDoc lines. The correct format should have a space after the asterisk:
/**
* Function to display banners in all pages
* @deprecated
*/The same issue appears on lines 76-77 and 116-117.
| /** | ||
| * This function is deprecated. Do not use! | ||
| */ | ||
| * @deprecated |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent formatting: the asterisk (*) should be aligned with other PHPDoc lines. The correct format should have a space after the asterisk:
/**
* This function is deprecated. Do not use!
* @deprecated
*/| * @deprecated | |
| * @deprecated |
| /** | ||
| * Functions to display dhtml loading image box | ||
| */ | ||
| * @deprecated |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent formatting: the asterisk (*) should be aligned with other PHPDoc lines. The correct format should have a space after the asterisk:
/**
* Functions to display dhtml loading image box
* @deprecated
*/| * @deprecated | |
| * @deprecated |
|
|
||
| /** | ||
| * Class XoopsTopic | ||
| * @deprecated |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The @deprecated tag should follow PHPDoc standards with additional information. According to PHPDoc standards, the @deprecated tag should include a version number and optionally a description or replacement suggestion. For example: @deprecated since version X.X.X Use AlternativeClass instead.
This applies to all deprecated items in this file.
| * @package kernel | ||
| * @subpackage core | ||
| * @author Goghs (http://www.eqiao.com/) | ||
| * @deprecated |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The @deprecated tag should follow PHPDoc standards with additional information. According to PHPDoc standards, the @deprecated tag should include a version number and optionally a description or replacement suggestion. For example: @deprecated since version X.X.X Use AlternativeClass instead.
This applies to all deprecated items in this file.
No description provided.