phpstan: fix comparison for get_object_vars#5271
Merged
sreichel merged 1 commit intoOpenMage:mainfrom Feb 16, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates SOAP API V2 data-preparation helpers to align with PHPStan’s understanding of get_object_vars() return type, and refreshes the PHPStan baseline accordingly.
Changes:
- Replace
get_object_vars(... ) !== nullwith... !== []in several SOAP V2 API helpers (customer/cart/payment) to avoid always-true strict comparisons. - Remove now-obsolete PHPStan baseline entries for the above always-true / unreachable-code findings.
- Add one new PHPStan baseline entry for an
if.alwaysFalsereport in the WEEE quote total collector.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/code/core/Mage/Customer/Model/Customer/Api/V2.php | Fixes get_object_vars() comparison to avoid always-true condition under PHPStan. |
| app/code/core/Mage/Checkout/Model/Cart/Payment/Api/V2.php | Same fix for payment data preparation in SOAP V2. |
| app/code/core/Mage/Checkout/Model/Cart/Customer/Api/V2.php | Same fix for customer/customer-address data preparation in SOAP V2. |
| .phpstan.dist.baseline.neon | Drops baseline items made obsolete by the fix; adds one new baseline suppression for WEEE. |
|
Hanmac
approved these changes
Feb 16, 2026
Contributor
|
Contributor
Author
|
Thx. Will check that later. |
Contributor
Author
|
Merged with one green flag .... should be safe. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description (*)
Fixes for phpstan update. (baselined one issue ... ignore report here)