Problem/Motivation

When running in Drupal 10, we're getting the following error being logged to watchdog, on any api_proxy API response:

Error: Call to undefined method Drupal\Core\Cache\CacheableResponse::create() in Drupal\api_proxy\Plugin\HttpApiPluginBase->corsResponse() (line 357 of /var/lib/tugboat/web/modules/contrib/api_proxy/src/Plugin/HttpApiPluginBase.php).

Steps to reproduce

Hit any API endpoint setup through api_proxy on Drupal 10.

Proposed resolution

Looks like \Symfony\Component\HttpFoundation\Response::create was deprected in Symfony 5.x and removed in 6.x, which is why the Drupal 10 upgrade missed it. Need to update our code here that uses it per the deprection notice in Symfony 5.x

Remaining tasks

Code update and test.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork api_proxy-3404389

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

m4olivei created an issue. See original summary.

  • m4olivei committed 5a5f81ec on 2.x
    Issue #3404389 by m4olivei: Error: Call to undefined method Drupal\Core\...
m4olivei’s picture

Assigned: m4olivei » Unassigned
Status: Active » Fixed

Fixed and merged to 2.x.

Status: Fixed » Closed (fixed)

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