-
Notifications
You must be signed in to change notification settings - Fork 1
composer updates #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates Composer dependencies and adds static analysis tools to improve code quality. The PR includes PHPStan for static analysis and fixes a potential type safety issue in URL parsing.
- Updated symfony/polyfill-mbstring to v1.33.0 and PHPUnit to v11.5
- Added development tools: PHPStan, PHP CodeSniffer, and Roave Security Advisories
- Fixed type safety issue in URL parsing logic
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| composer.json | Updated dependencies and added development tools for code quality |
| phpstan.neon | Added PHPStan configuration file for static analysis |
| src/PublicSuffixList.php | Fixed potential type error in URL parsing logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| */ | ||
| private function readPSL() | ||
| { | ||
| $parts = \parse_url($this->url); |
Copilot
AI
Sep 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix assumes parse_url() always returns an array or false, but it can also return null for severely malformed URLs. Consider using \is_array($parts) check or handle the null case explicitly to prevent potential type errors.
| $parts = \parse_url($this->url); | |
| $parts = \parse_url($this->url); | |
| // parse_url() can return null or false for malformed URLs; \is_array($parts) ensures safe access |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.