Since Symfony 6 JsonResponde uses __construct() method instead of create() method

Created on 20 March 2023, about 2 years ago
Updated 20 April 2023, almost 2 years ago

Problem/Motivation

The error is displaying in Recent Log Message when an existing node is edited:
Error: Call to undefined method Symfony\Component\HttpFoundation\JsonResponse::create() in Drupal\acquia_dam\Controller\EditorMediaController->isExpired() (line 172 of /var/www/docroot/modules/contrib/acquia_dam/src/Controller/EditorMediaController.php).

Steps to reproduce

Create a node
Add a DAM Image in body field with Insert Media from CKEditor 5
Save the node
Edit the node again and check Recent Log Messages

Proposed resolution

The create() method from JsonResponde class is deprecated since Symfony 5.1 and is used __construct() instead since Symfony 6.

Remaining tasks

To check all use cases where JsonResponse is used.

User interface changes

No

API changes

No

Data model changes

No

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇲🇩Moldova sandzel Chisinau

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024