WordPress.org

Make WordPress Core

Opened 9 months ago

Last modified 3 days ago

#48350 reviewing task (blessed)

Stricter docs for WP_Http::processHeaders()

Reported by: marekdedic Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: minor Version: 5.2
Component: HTTP API Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

I believe the function could better document the parameter and return types. From a look at the source, maybe something like this:

@param string|string[] $headers
@param string          $url

@return array {
    @type array $response {
        @type int    $code
        @type string $message
    }
    @type string|string[]  $newheaders
    @type WP_Http_Cookie[] $cookies
}

+ comments obviously.

Attachments (4)

48350.diff (1.5 KB) - added by valchovski 9 months ago.
48350.2.diff (1.5 KB) - added by deepaklalwani 10 days ago.
Refreshes patch
48350.3.diff (1.6 KB) - added by deepaklalwani 10 days ago.
Fix parameter alignment and add parameter default value details
48350.4.diff (1.6 KB) - added by thimalw 10 days ago.
Fix a typo that was already fixed in trunk

Download all attachments as: .zip

Change History (15)

#1 @johnbillion
9 months ago

  • Keywords needs-patch good-first-bug added

#2 @desrosj
9 months ago

  • Milestone changed from Awaiting Review to 5.4

@valchovski
9 months ago

#3 @valchovski
9 months ago

  • Keywords has-patch added; needs-patch removed

Heya!

Attached a file containing expanded documentation for processHeaders().

Looking forward to any feedback!

#4 @SergeyBiryukov
9 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 @davidbaumwald
5 months ago

@SergeyBiryukov Are you still reviewing this one for 5.4?

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


5 months ago

#7 @davidbaumwald
5 months ago

  • Keywords needs-refresh added
  • Milestone changed from 5.4 to Future Release

The most recent patch fails against trunk. This ticket still needs a refreshed patch, and with 5.4 Beta 1 landing tomorrow, this is being moved to Future Release. If any maintainer or committer feels this can be included in 5.4 or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

#8 @SergeyBiryukov
5 months ago

  • Milestone changed from Future Release to 5.5

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


10 days ago

@deepaklalwani
10 days ago

Refreshes patch

@deepaklalwani
10 days ago

Fix parameter alignment and add parameter default value details

@thimalw
10 days ago

Fix a typo that was already fixed in trunk

#10 @thimalw
9 days ago

  • Keywords needs-refresh removed

#11 @SergeyBiryukov
3 days ago

  • Type changed from enhancement to task (blessed)
Note: See TracTickets for help on using tickets.