Fix Compatibility Issue: Implement Correct Type Hints in NullLogger for PHP 8.x
#1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request addresses a compatibility issue encountered with Magento 2.4.7-p2 where the
NullLoggerclass in the202ecommerce/bridge-sdkpackage does not implement theLoggerInterfacemethods with the correct type hints, leading to runtime errors.Issue Details:
Steps to Reproduce:
202ecommerce/bridge-sdk).NullLoggerclass.Expected Behavior:
The
NullLoggerclass should correctly implement theLoggerInterfacemethods with appropriate type hints for PHP 8.x compatibility.Actual Behavior:
The
NullLoggerclass currently uses method signatures without proper type hints, causing runtime errors in PHP 8.x.Fix:
NullLoggermethods to include strict type hints, particularly for the$messageparameter, which now acceptsstring|\Stringable.voidto align with PHP 8.x best practices.Impact:
This fix ensures that the
NullLoggerclass in the Bridge SDK is fully compatible with PHP 8.x and resolves the runtime errors caused by incorrect method signatures.