From a323613241088518f392ae6d0a3331c720648865 Mon Sep 17 00:00:00 2001
From: Pascal Querner
Date: Thu, 26 Oct 2023 17:12:37 +0200
Subject: [PATCH 1/4] feat: add event when installed and a uncatched exception
is thrown
---
app/Mage.php | 1 +
docs/EVENTS.md | 1 +
2 files changed, 2 insertions(+)
diff --git a/app/Mage.php b/app/Mage.php
index 5d31a215511..49cf037fcc4 100644
--- a/app/Mage.php
+++ b/app/Mage.php
@@ -751,6 +751,7 @@ public static function run($code = '', $type = 'store', $options = [])
die();
} catch (Exception $e) {
if (self::isInstalled()) {
+ self::dispatchEvent('mage_installed_exception', ['exception' => $e]);
self::printException($e);
exit();
}
diff --git a/docs/EVENTS.md b/docs/EVENTS.md
index 8557533c0d8..6d13f925139 100644
--- a/docs/EVENTS.md
+++ b/docs/EVENTS.md
@@ -234,6 +234,7 @@
| log_log_clean_after | 1.9.4.5 |
| log_log_clean_before | 1.9.4.5 |
| log_visitor_collection_load_before | 1.9.4.5 |
+| mage_installed_exception | TO_BE_DETERMINED |
| mage_run_exception | 1.9.4.5 |
| model_config_data_save_before | 1.9.4.5 |
| model_delete_after | 1.9.4.5 |
From a7fd5a6821bc28e3bfb8e311b524573ee4831514 Mon Sep 17 00:00:00 2001
From: Fabrizio Balliano
Date: Fri, 26 Apr 2024 18:41:58 +0100
Subject: [PATCH 2/4] whitespace
---
app/Mage.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/Mage.php b/app/Mage.php
index c5333cf91c5..8fa866aaac9 100644
--- a/app/Mage.php
+++ b/app/Mage.php
@@ -745,7 +745,7 @@ public static function run($code = '', $type = 'store', $options = [])
if (isset($options['edition'])) {
self::$_currentEdition = $options['edition'];
}
- self::$_app = new Mage_Core_Model_App();
+ self::$_app = new Mage_Core_Model_App();
if (isset($options['request'])) {
self::$_app->setRequest($options['request']);
}
From 83da971df00442994034ff7fe082a6671c6fd853 Mon Sep 17 00:00:00 2001
From: Pascal Querner
Date: Tue, 30 Apr 2024 15:27:20 +0200
Subject: [PATCH 3/4] chore: change event name
Co-authored-by: Fabrizio Balliano
---
app/Mage.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/Mage.php b/app/Mage.php
index 8fa866aaac9..0c8564f9b7d 100644
--- a/app/Mage.php
+++ b/app/Mage.php
@@ -769,7 +769,7 @@ public static function run($code = '', $type = 'store', $options = [])
die();
} catch (Exception $e) {
if (self::isInstalled()) {
- self::dispatchEvent('mage_installed_exception', ['exception' => $e]);
+ self::dispatchEvent('mage_run_installed_exception', ['exception' => $e]);
self::printException($e);
exit();
}
From e651b50cedb3fe15f47fe8d6400beb756e0bd0e7 Mon Sep 17 00:00:00 2001
From: Pascal Querner
Date: Tue, 30 Apr 2024 15:27:57 +0200
Subject: [PATCH 4/4] chore: change event name and OM availability
Co-authored-by: Fabrizio Balliano
---
docs/EVENTS.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/EVENTS.md b/docs/EVENTS.md
index a52c4d4e73f..63f7aa8a314 100644
--- a/docs/EVENTS.md
+++ b/docs/EVENTS.md
@@ -235,7 +235,7 @@
| log_log_clean_after | 1.9.4.5 |
| log_log_clean_before | 1.9.4.5 |
| log_visitor_collection_load_before | 1.9.4.5 |
-| mage_installed_exception | TO_BE_DETERMINED |
+| mage_run_installed_exception | 20.7.0 |
| mage_run_exception | 1.9.4.5 |
| model_config_data_save_before | 1.9.4.5 |
| model_delete_after | 1.9.4.5 |