phpStan: update escapeHtml() docs - #5609
Open
sreichel wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the PHPStan/PHPDoc typing for Mage_Core_Block_Abstract::escapeHtml() and refreshes the PHPStan baseline files accordingly, with the goal of improving static analysis signal around HTML escaping usage across blocks and templates.
Changes:
- Updated
escapeHtml()PHPDoc inMage_Core_Block_Abstractto use a template-based, argument-dependent return type. - Regenerated/updated PHPStan baselines, removing many now-unneeded ignores and adding new ignores introduced by the template-based PHPDoc.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| app/code/core/Mage/Core/Block/Abstract.php | Adjusts escapeHtml() PHPDoc to change PHPStan’s inferred parameter/return types. |
| .phpstan.dist.baselines/return.type.php | Removes several previously needed ignores after type inference changes. |
| .phpstan.dist.baselines/offsetAccess.nonOffsetAccessible.php | Updates ignore message text to match new inferred types. |
| .phpstan.dist.baselines/offsetAccess.invalidOffset.php | Removes an ignore that is no longer triggered. |
| .phpstan.dist.baselines/method.childParameterType.php | Adds ignores for new contravariance findings related to escapeHtml() overrides. |
| .phpstan.dist.baselines/if.condNotBoolean.php | Updates ignore messages/counts after type inference changes. |
| .phpstan.dist.baselines/encapsedStringPart.nonString.php | Removes ignores no longer triggered due to updated escapeHtml typing. |
| .phpstan.dist.baselines/elseif.condNotBoolean.php | Adds/adjusts ignores to match updated analysis results. |
| .phpstan.dist.baselines/echo.nonString.php | Large baseline refresh reflecting new inferred types for echo expressions. |
| .phpstan.dist.baselines/binaryOp.invalid.php | Removes ignores no longer triggered due to updated typing. |
| .phpstan.dist.baselines/assignOp.invalid.php | Removes an ignore no longer triggered due to updated typing. |
| .phpstan.dist.baselines/argument.type.php | Removes many ignores no longer triggered due to updated typing. |
| .phpstan.dist.baselines/argument.templateType.php | Adds a new baseline file to ignore template-type resolution errors. |
| .phpstan.dist.baselines/_loader.php | Includes the new argument.templateType.php baseline file. |
|
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.



No description provided.