-
Couldn't load subscription status.
- Fork 2
Open
Description
We have encountered an issue with Magento 2.4.7-p2 where the NullLogger class in the bridge-sdk package does not implement the LoggerInterface methods with the correct type hints, causing compatibility issues.
Steps to Reproduce:
- Install Magento 2.4.7-p2 with the Bridge SDK (
202ecommerce/bridge-sdk). - Attempt to log any message using the
NullLoggerclass. - Observe the error due to incorrect method signatures.
Expected Behavior:
The NullLogger class should correctly implement the LoggerInterface methods with the appropriate type hints for PHP 8.x compatibility.
Actual Behavior:
The NullLogger class currently uses method signatures without proper type hints, causing runtime errors.
Proposed Solution:
The following patch fixes the issue by adding type hints to the method signatures:
Index: vendor/202ecommerce/bridge-sdk/src/Logger/NullLogger.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/vendor/202ecommerce/bridge-sdk/src/Logger/NullLogger.php b/vendor/202ecommerce/bridge-sdk/src/Logger/NullLogger.php
--- a/vendor/202ecommerce/bridge-sdk/src/Logger/NullLogger.php (revision eaace34e5b25a1e8dcc2596c1f62852164b06512)
+++ b/vendor/202ecommerce/bridge-sdk/src/Logger/NullLogger.php (date 1724426858356)
@@ -19,39 +19,39 @@
class NullLogger implements LoggerInterface
{
- public function emergency($message, array $context = [])
+ public function emergency(string|\Stringable $message, array $context = []): void
{
}
- public function alert($message, array $context = [])
+ public function alert(string|\Stringable $message, array $context = []): void
{
}
- public function critical($message, array $context = [])
+ public function critical(string|\Stringable $message, array $context = []): void
{
}
- public function error($message, array $context = [])
+ public function error(string|\Stringable $message, array $context = []): void
{
}
- public function warning($message, array $context = [])
+ public function warning(string|\Stringable $message, array $context = []): void
{
}
- public function notice($message, array $context = [])
+ public function notice(string|\Stringable $message, array $context = []): void
{
}
- public function info($message, array $context = [])
+ public function info(string|\Stringable $message, array $context = []): void
{
}
- public function debug($message, array $context = [])
+ public function debug(string|\Stringable $message, array $context = []): void
{
}
- public function log($level, $message, array $context = [])
+ public function log($level, string|\Stringable $message, array $context = []): void
{
}
}Metadata
Metadata
Assignees
Labels
No labels