From 1ad265611f58dfeef58acf45569bccf90c16f97d Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 19 Jun 2023 17:39:53 +0300 Subject: [PATCH 1/2] fix entity manager --- .../Tools/EntityManager/EntityManager.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/application/Espo/Tools/EntityManager/EntityManager.php b/application/Espo/Tools/EntityManager/EntityManager.php index dcb080c678..d753702637 100644 --- a/application/Espo/Tools/EntityManager/EntityManager.php +++ b/application/Espo/Tools/EntityManager/EntityManager.php @@ -1688,12 +1688,19 @@ class EntityManager { $templateType = $this->metadata->get(['scopes', $entityType, 'type']); - /** @var array> $params */ - $params = [ - ...($this->metadata->get(['app', 'entityManagerParams', 'Global']) ?? []), - ...($this->metadata->get(['app', 'entityManagerParams', '@' . ($templateType ?? '_')]) ?? []), - ...($this->metadata->get(['app', 'entityManagerParams', $entityType]) ?? []), - ]; + $map1 = $this->metadata->get(['app', 'entityManagerParams', 'Global']) ?? []; + $map2 = $this->metadata->get(['app', 'entityManagerParams', '@' . ($templateType ?? '_')]) ?? []; + $map3 = $this->metadata->get(['app', 'entityManagerParams', $entityType]) ?? []; + + if (version_compare(PHP_VERSION, '8.1.0') < 0) { + // @todo Remove. + /** @var array> $params */ + $params = array_merge($map1, $map2, $map3); + } + else { + /** @var array> $params */ + $params = [...$map1, ...$map2, ...$map3]; + } $result = []; From 1f04ba5083992fc4ebba8a3f05c272c14f4a77e5 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 19 Jun 2023 19:15:40 +0300 Subject: [PATCH 2/2] 7.5.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fd05ef5d14..f870b63356 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "espocrm", - "version": "7.5.1", + "version": "7.5.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "espocrm", - "version": "7.5.1", + "version": "7.5.2", "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { diff --git a/package.json b/package.json index a365514fbf..af7124b5f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "espocrm", - "version": "7.5.1", + "version": "7.5.2", "description": "Open-source CRM.", "repository": { "type": "git",