Make WordPress Core

Opened 8 months ago

Closed 8 months ago

#58092 closed defect (bug) (invalid)

WpOrg\Requests missing use statement for Stringable

Reported by: kkmuffme's profile kkmuffme Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.2
Component: External Libraries Keywords:
Focuses: Cc:

Description

namespace WpOrg\Requests classes use global namespace Stringable object in phpdoc, but "use" statement is missing everywhere.
e.g. Session.php construct

Please add the use statement

Change History (6)

#1 @costdev
8 months ago

  • Component changed from HTTP API to External Libraries
  • Keywords reporter-feedback close added
  • Milestone Awaiting Review deleted

Hi @kkmuffme, thanks for opening this ticket.

Requests is maintained on the Requests GitHub repository, so issues/suggestions should be raised there.

When you open the issue, please drop a link to it here so that others can follow the discussion and we can then close this ticket as reported-upstream.

Thanks!

#3 @costdev
8 months ago

  • Keywords reporter-feedback close removed
  • Resolution set to reported-upstream
  • Status changed from new to closed

Thanks @kkmuffme!

Closing as reported-upstream.

#4 @jrf
8 months ago

Just FYI: I've closed the ticket in Requests as invalid as there is no truth to the claim at all. Docs in Requests use FQCNs already.

#5 follow-up: @kkmuffme
8 months ago

  • Resolution reported-upstream deleted
  • Status changed from closed to reopened

Just checked the upstream and you are correct - it's correct there.

However in WP 6.2 the FQCN is missing.

Look at Session.php, in github you have @param string|\Stringable|null $url but in WP 6.2 (downloaded zip from WP) it is @param string|Stringable|null $url
Is this because WP 6.2 does not have the latest version of this lib or is this a bug in the WP build process?
@jrf

#6 in reply to: ↑ 5 @jrf
8 months ago

  • Resolution set to invalid
  • Status changed from reopened to closed

Replying to kkmuffme:

Just checked the upstream and you are correct - it's correct there.

However in WP 6.2 the FQCN is missing.

Look at Session.php, in github you have @param string|\Stringable|null $url but in WP 6.2 (downloaded zip from WP) it is @param string|Stringable|null $url
Is this because WP 6.2 does not have the latest version of this lib or is this a bug in the WP build process?
@jrf

Docs and tests are continuously under improvement in Requests. This may have been changed between the 2.0.5 release which was included in WP 6.2 and now.

The develop branch for Requests is currently for the 2.1.0 release.

The Request team did a 2.0.6 release earlier this week, which has already been included in WP trunk, see Trac #58079.
For patch releases like that, select backports are done, but only for the most significant changes within the limits of what is allowed to be included in a patch release.

The official documentation for Requests is here: https://requests.ryanmccue.info/

As long as WP upgrades regularly when there are new releases - which is currently (finally) being done again -, these doc changes will automatically trickle into WP at some point.

Note: See TracTickets for help on using tickets.