Problem/Motivation

In #3123832: [META] Fix @todo items referencing closed issues we've discovered there are a couple of identical @todos in \Drupal\Tests\rest\Unit\EventSubscriber\ResourceResponseSubscriberTest::providerTestResponseFormat.
This @todo is linked to an d.o. issue that is already closed: #2752325: Automatically provide HEAD support when a REST resource supports GET.

This is the @todo:

// @todo add 'HEAD' in https://www.drupal.org/node/2752325

Steps to reproduce

Proposed resolution

Re-enable the testGet() in this class since it now runs without errors.

Remaining tasks

Add 'HEAD'-method to \Drupal\Tests\rest\Unit\EventSubscriber\ResourceResponseSubscriberTest::providerTestResponseFormat, since support for that was added in #2752325: Automatically provide HEAD support when a REST resource supports GET.

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3374874

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Spokje created an issue. See original summary.

spokje’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Seems like a simple change that didn't break anything. Not sure much more to review so will mark for @Spokje

quietone’s picture

Assigned: Unassigned » quietone

Did some digging and In #2752325: Automatically provide HEAD support when a REST resource supports GET this was added, which was removed in #2775479: Try to remove the "map HEAD to GET" logic in \Drupal\rest\RequestHandler::handle()

+ // @see \Symfony\Component\HttpFoundation\Response::prepare()
+ if ($method === 'head') {
+ $method = 'get';
+ }

The changes here seem correct to me. I will assign to myself to commit tomorrow (it is too late now).

  • quietone committed 66710e60 on 11.x
    Issue #3374874 by Spokje, smustgrave: Add 'HEAD'-method to \Drupal\Tests...
quietone’s picture

Status: Reviewed & tested by the community » Fixed

Once again, it has taken more than a day to get back to an issue. Wow 21 days, that is a new record.

It is now committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

quietone’s picture

Assigned: quietone » Unassigned