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
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
Comment #4
m4oliveiFixed and merged to 2.x.