Align DOM observer registration with PHP 8.5 and add PHP 8.5 CI validation#138
Align DOM observer registration with PHP 8.5 and add PHP 8.5 CI validation#138Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/voku/HtmlMin/sessions/1a74d871-5b13-42d4-b172-ee87a4776089 Co-authored-by: voku <264695+voku@users.noreply.github.com>
Agent-Logs-Url: https://github.com/voku/HtmlMin/sessions/c4646820-ee2c-4ae4-99b6-2d713d8aece6 Co-authored-by: voku <264695+voku@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a configuration for Infection mutation testing and strengthens static analysis by removing the exclusion for missing iterable value types in PHPStan. The HtmlMin class has been updated with more precise type annotations, additional null checks for node values, and improved validation for template logic and special script tags. Review feedback suggests aligning exception messages with their respective method names in the newly added validation logic to improve maintainability.
| $validatedTemplateLogicSyntaxInSpecialScriptTags = []; | ||
| foreach ($templateLogicSyntaxInSpecialScriptTags as $tmp) { | ||
| if (!\is_string($tmp)) { | ||
| throw new \InvalidArgumentException('setTemplateLogicSyntaxInSpecialScriptTags only allows string[]'); |
There was a problem hiding this comment.
The exception message refers to setTemplateLogicSyntaxInSpecialScriptTags, but the method name is overwriteTemplateLogicSyntaxInSpecialScriptTags. It is recommended to update the message to match the method name for better clarity and maintainability.
throw new \InvalidArgumentException('overwriteTemplateLogicSyntaxInSpecialScriptTags only allows string[]');| $validatedSpecialScriptTags = []; | ||
| foreach ($specialScriptTags as $tag) { | ||
| if (!\is_string($tag)) { | ||
| throw new \InvalidArgumentException('SpecialScriptTags only allows string[]'); |
|
@copilot the next llm generated feedback is maybe completely shot or not, you need to check if by yourself : Code Review src/voku/helper/HtmlMin.php The exception message refers to setTemplateLogicSyntaxInSpecialScriptTags, but the method name is overwriteTemplateLogicSyntaxInSpecialScriptTags. It is recommended to update the message to match the method name for better clarity and maintainability. @voku Reply... The exception message could be updated to match the method name overwriteSpecialScriptTags for consistency. |
Agent-Logs-Url: https://github.com/voku/HtmlMin/sessions/6d4cb1d3-82e6-4d7b-a893-c981c65a02af Co-authored-by: voku <264695+voku@users.noreply.github.com>
Updated in |
|



This change is