PHP 8.2 - Fix deprecated callable patterns in unit test #285
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.
Fix "Known issue" section of PR #275
Expected Result
Those test case bellow pass without "deprecated message" on php 8.2 (same as php 7.4, php 8.0, php 8.1)
Actual Result
List test case raise deprecated message
zf1-future/tests/Zend/EventManager/EventManagerTest.php
Lines 65 to 87 in f6f029c
zf1-future/tests/Zend/EventManager/EventManagerTest.php
Lines 116 to 139 in f6f029c
zf1-future/tests/Zend/EventManager/FilterChainTest.php
Lines 60 to 90 in f6f029c
PHP call stack raise deprecated message
Sample 1 test case only:
CALL STACK
Solution
Deprecated pattern: is_callable([new MyClass(), "MyOtherClass::myMethod"])
Migrate to pattern: is_callable([new MyClass(), "myMethod"])