From c004068f2bb1bb3e617cecc00bb5d6d035a35c48 Mon Sep 17 00:00:00 2001 From: Stefan Froemken <sfroemken@jweiland.net> Date: Tue, 5 Mar 2024 11:04:54 +0100 Subject: [PATCH 1/8] Do not store FlashMessages in BE session in CLI context --- Classes/Helper/MessageHelper.php | 3 ++- Documentation/ChangeLog/Index.rst | 8 ++++++++ Documentation/Settings.cfg | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Classes/Helper/MessageHelper.php b/Classes/Helper/MessageHelper.php index 97df4af7..8d8accfd 100644 --- a/Classes/Helper/MessageHelper.php +++ b/Classes/Helper/MessageHelper.php @@ -11,6 +11,7 @@ namespace JWeiland\Maps2\Helper; +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Messaging\FlashMessageQueue; use TYPO3\CMS\Core\Messaging\FlashMessageService; @@ -40,7 +41,7 @@ public function addFlashMessage(string $message, string $title = '', int $severi $message, $title, $severity, - true + !Environment::isCli() ); $this->getFlashMessageQueue()->enqueue($flashMessage); diff --git a/Documentation/ChangeLog/Index.rst b/Documentation/ChangeLog/Index.rst index 5b7c70cb..404bfc7d 100644 --- a/Documentation/ChangeLog/Index.rst +++ b/Documentation/ChangeLog/Index.rst @@ -6,6 +6,14 @@ ChangeLog ========= +**Version 9.3.14** + +- BUGFIX: Do not store FlashMessages in BE session in CLI context + +**Version 9.3.13** + +- BUGFIX: Add lazy annotation to prevent recursive validation + **Version 9.3.12** - BUGFIX: Class ApplicationType not found. Repair TYPO3 9 compatibility. diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg index 12fc32a1..c3ee0fd1 100644 --- a/Documentation/Settings.cfg +++ b/Documentation/Settings.cfg @@ -22,7 +22,7 @@ project = maps2 (Maps2) version = 9.3 -release = 9.3.13 +release = 9.3.14 t3author = Stefan Froemken copyright = since 2013 by jweiland.net From 5151948b5f31698010af59b0d98c5469550d907e Mon Sep 17 00:00:00 2001 From: Stefan Froemken <sfroemken@jweiland.net> Date: Tue, 5 Mar 2024 11:05:17 +0100 Subject: [PATCH 2/8] Update version to 9.3.14 --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index 5d58513b..21c2176e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -3,7 +3,7 @@ $EM_CONF[$_EXTKEY] = [ 'title' => 'Maps2', 'description' => 'Create maps with Marker, Area, Routes or Radius based on Google Maps or OpenStreetMap', - 'version' => '9.3.13', + 'version' => '9.3.14', 'category' => 'plugin', 'state' => 'stable', 'uploadfolder' => false, From ab4c326b72f9252a82e1367b6eaf5b616798de8e Mon Sep 17 00:00:00 2001 From: Stefan Froemken <sfroemken@jweiland.net> Date: Tue, 5 Mar 2024 11:07:53 +0100 Subject: [PATCH 3/8] Update homepage in composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f1739683..e8400a2f 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "Create maps with Marker, Area, Routes or Radius based on Google Maps or OpenStreetMap", "license": "GPL-2.0-or-later", "keywords": ["typo3", "TYPO3 CMS", "google maps", "osm", "open street map", "openstreetmap", "maps2"], - "homepage": "http://www.jweiland.net", + "homepage": "https://jweiland.net", "authors": [ { "name": "Stefan Froemken", From 5c622c8ab7ea7896add18247db9532ff60773cd4 Mon Sep 17 00:00:00 2001 From: Stefan Froemken <sfroemken@jweiland.net> Date: Tue, 5 Mar 2024 11:08:28 +0100 Subject: [PATCH 4/8] Remove roave security package because of out-dated TYPO3 versions --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index e8400a2f..fea08c5a 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "typo3/cms-core": "^9.5.17 || ^10.4.2" }, "require-dev": { - "roave/security-advisories": "dev-latest", "friendsofphp/php-cs-fixer": "^3.4", "nimut/testing-framework": "^6.0", "phpunit/phpunit": "^9.5", From b62d2fed8c78e3d03be820da3854bf6153ae7065 Mon Sep 17 00:00:00 2001 From: Stefan Froemken <sfroemken@jweiland.net> Date: Tue, 5 Mar 2024 11:11:02 +0100 Subject: [PATCH 5/8] Update allow-plugins in composer.json --- composer.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index fea08c5a..0dbfc5fa 100644 --- a/composer.json +++ b/composer.json @@ -39,8 +39,11 @@ } }, "config": { - "vendor-dir": ".build/vendor" - }, + "vendor-dir": ".build/vendor", + "allow-plugins": { + "typo3/class-alias-loader": true, + "typo3/cms-composer-installers": true + } }, "extra": { "typo3/cms": { "extension-key": "maps2", From 0a4aad0135ff7982929d21f3bc8fd3cabfca887b Mon Sep 17 00:00:00 2001 From: Stefan Froemken <sfroemken@jweiland.net> Date: Tue, 5 Mar 2024 11:12:41 +0100 Subject: [PATCH 6/8] Add replace section to composer.json --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0dbfc5fa..48b150ca 100644 --- a/composer.json +++ b/composer.json @@ -38,12 +38,16 @@ "JWeiland\\Maps2\\Tests\\": "Tests" } }, + "replace": { + "typo3-ter/maps2": "self.version" + }, "config": { "vendor-dir": ".build/vendor", "allow-plugins": { "typo3/class-alias-loader": true, "typo3/cms-composer-installers": true - } }, + } + }, "extra": { "typo3/cms": { "extension-key": "maps2", From b4972289c0d2d7bad7c3552e6dd6953fe8325382 Mon Sep 17 00:00:00 2001 From: Stefan Froemken <sfroemken@jweiland.net> Date: Tue, 5 Mar 2024 11:15:58 +0100 Subject: [PATCH 7/8] Update lines mentioned by php-cs-fixer --- Classes/Tca/Maps2Registry.php | 1 - Classes/Update/MoveOldFlexFormSettingsUpdate.php | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Classes/Tca/Maps2Registry.php b/Classes/Tca/Maps2Registry.php index 9090e47f..e39520dd 100644 --- a/Classes/Tca/Maps2Registry.php +++ b/Classes/Tca/Maps2Registry.php @@ -217,7 +217,6 @@ protected function applyTcaForTableAndField(string $tableName, string $fieldName */ protected function addToAllTCAtypes(string $tableName, string $fieldName, array $options) { - // Makes sure to add more TCA to an existing structure if (isset($GLOBALS['TCA'][$tableName]['columns'])) { if (empty($options['fieldList'])) { diff --git a/Classes/Update/MoveOldFlexFormSettingsUpdate.php b/Classes/Update/MoveOldFlexFormSettingsUpdate.php index 3749f043..59b8e3c3 100644 --- a/Classes/Update/MoveOldFlexFormSettingsUpdate.php +++ b/Classes/Update/MoveOldFlexFormSettingsUpdate.php @@ -73,15 +73,15 @@ public function updateNecessary(): bool try { if ( - ArrayUtility::getValueByPath( - $valueFromDatabase, - 'data/sGoogleMapsOptions/lDEF/settings.activateScrollWheel' - ) + ArrayUtility::getValueByPath( + $valueFromDatabase, + 'data/sGoogleMapsOptions/lDEF/settings.activateScrollWheel' + ) ) { return true; } } catch (MissingArrayPathException $e) { - // If value does not exists, check further requirements + // If value does not exist, check further requirements } catch (\RuntimeException $e) { // Some as above, but for TYPO3 8 } From d027f8085e6c37dc4bdc75b71fd96cd3ded2d9b4 Mon Sep 17 00:00:00 2001 From: Stefan Froemken <sfroemken@jweiland.net> Date: Tue, 5 Mar 2024 11:16:44 +0100 Subject: [PATCH 8/8] Set storeInSession to false in func. tests as it is CLI context --- Tests/Functional/Helper/MessageHelperTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Functional/Helper/MessageHelperTest.php b/Tests/Functional/Helper/MessageHelperTest.php index 0e422680..4a6dba83 100644 --- a/Tests/Functional/Helper/MessageHelperTest.php +++ b/Tests/Functional/Helper/MessageHelperTest.php @@ -62,7 +62,7 @@ public function addFlashMessageWithMessageCallsEnqueue() 'Hello', '', FlashMessage::OK, - true + false ); $this->subject->addFlashMessage('Hello'); @@ -82,7 +82,7 @@ public function addFlashMessageWithMessageAndSubjectCallsEnqueue() 'Hello', 'Subject', FlashMessage::OK, - true + false ); $this->subject->addFlashMessage('Hello', 'Subject'); @@ -102,7 +102,7 @@ public function addFlashMessageWithAllArgumentsCallsEnqueue() 'Hello', 'Subject', FlashMessage::ERROR, - true + false ); $this->subject->addFlashMessage('Hello', 'Subject', FlashMessage::ERROR);