Symfony 6 compatibility.

Created on 29 December 2023, 6 months ago
Updated 29 January 2024, 5 months ago

Problem/Motivation

Symfony 6 changed the way InputBag::get() worked, no longer allowing for arrays to be default values when calling the get function. Because of that, if this module is used on a facet that can have multiple values on D10 it will crash with the following error:

InvalidArgumentException: Expected a scalar value as a 2nd argument to "Symfony\Component\HttpFoundation\InputBag::get()", "array" given. in Symfony\Component\HttpFoundation\InputBag->get() (line 31 of C:\Acsysweb\cals.cornell.edu\vendor\symfony\http-foundation\InputBag.php).

Proposed resolution

Replace the get function with the all function instead. This is the same way Facets fixed the issue in their module and seems to work fine.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jacobbell84

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

Comments & Activities

Production build 0.69.0 2024