Make WordPress Core

Opened 13 days ago

Last modified 3 days ago

#65132 new defect (bug)

Incorrect `@since` annotation for `wp_get_user_request()`

Reported by: swissspidy's profile swissspidy Owned by:
Milestone: Future Release Priority: low
Severity: trivial Version:
Component: Privacy Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

wp_get_user_request_data() was renamed to wp_get_user_request() in [47245] in WP 5.4.0, and the former deprecated. However, the docblock for wp_get_user_request() wasn't updated and wrongly indicates it was introduced in 4.9.6, when it was actually 5.4.0

Change History (5)

This ticket was mentioned in PR #11653 on WordPress/wordpress-develop by @lakshyajeet.


13 days ago
#1

  • Keywords has-patch added; needs-patch removed

Trac ticket: https://core.trac.wordpress.org/ticket/65132

This PR corrects the @since annotation for wp_get_user_request() in src/wp-includes/user.php, updating it from 4.9.6 to 5.4.0.

The function wp_get_user_request_data() was renamed to wp_get_user_request() in WordPress 5.4.0 (changeset 47245), and the original function was deprecated. However, the docblock for wp_get_user_request() was not updated at the time and incorrectly stated that it was introduced in version 4.9.6.

### Use of AI Tools

AI assistance: Yes
Model(s): Gemini 3.1 Pro
Used for: Drafting this PR description.

#2 @gaurangsondagar
13 days ago

Patch Report Testing

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11653/commits/23f367fb7cac4861204b7eaf57190e12250e25d7

Environment:

  • PHP: 8.2.29
  • WordPress: 7.0-RC2-62242
  • Web server: Apache
  • Database: MySQL
  • Browser: Chrome
  • OS: Ubuntu 22.04.5 LTS

Result:
This Patch corrects the @since annotation for wp_get_user_request() in src/wp-includes/user.php, updating it from 4.9.6 to 5.4.0.

Screenshot for reference:
https://snipboard.io/dR1uBN.jpg

#3 @nikunj8866
12 days ago

  • Keywords changes-requested added

I've reviewed the PR and left some feedback. Please take a look.

#4 @nikunj8866
12 days ago

  • Keywords changes-requested removed

This ticket was mentioned in PR #11742 on WordPress/wordpress-develop by crmv1.


3 days ago
#5

Adds the missing @since 5.4.0 description to the wp_get_user_request() DocBlock, noting that the function was renamed from wp_get_user_request_data().

Note: See TracTickets for help on using tickets.