chore: bump project to php 8.5

This commit is contained in:
fromme committed 2026-10-01 09:55:34 +02:00
1 parent 838b8944a2
commit 1446211d22
8 files changed
+35 -10

No files matched your search

@@ -90,15 +90,20 @@ class CrmAttributesResponse
// a response the CRM sent no attributes in still has to flatten to an empty set
foreach ($this->getAttributeGroups() ?? [] as $group) {
/** @var CrmAttributeGroup $group */
if (false === isset($crmSelections[$group->getLabel()])) {
$crmSelections[$group->getLabel()] = [];
// The CRM may report a group without a label. PHP used to coerce that null
// to an empty string on its own; since 8.5 it deprecates it, so the same
// key is now formed explicitly and nothing about the result changes.
$label = $group->getLabel() ?? '';
if (false === isset($crmSelections[$label])) {
$crmSelections[$label] = [];
}
foreach ($group->getAttributes() ?? [] as $attribute) {
/** @var CrmAttribute $attribute */
if (false === $attribute->isSelected()) {
continue;
}
$crmSelections[$group->getLabel()][] = $attribute->getLabel();
$crmSelections[$label][] = $attribute->getLabel();
}
}