Update phpstan/phpstan requirement from ^1.12 to ^2.1#63
Conversation
--- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.1.54 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
e71f8de to
ba2d18c
Compare
|
@copilot please fix |
Agent-Logs-Url: https://github.com/CorpusPHP/HttpMessageUtils/sessions/0ca2f07a-624c-46af-987e-d7ada61c3246 Co-authored-by: donatj <133747+donatj@users.noreply.github.com>
Fixed in 79fb31c. PHPStan 2.x now types |
|
@copilot remove the spaces you added in the array type definitions. There should be no spaces |
Agent-Logs-Url: https://github.com/CorpusPHP/HttpMessageUtils/sessions/bb6ef3c3-778e-4fd0-ac12-94ebce7db3d7 Co-authored-by: donatj <133747+donatj@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the development toolchain to PHPStan 2.1 and adjusts ProxyAwareSchemer’s server-value handling so the codebase type-checks cleanly under the stricter analyzer. This fits the repo’s existing CI/static-analysis workflow by keeping the library compatible with newer tooling without changing its public surface area.
Changes:
- Bumps
phpstan/phpstaninrequire-devfrom^1.12to^2.1. - Broadens
ProxyAwareSchemer’s server-array annotations from scalar-only to mixed values. - Adds runtime guards before lowercasing scheme values and parsing forwarded ports.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/ProxyAwareSchemer.php |
Updates parameter/property phpdoc types and adds guards around forwarded scheme/port inspection. |
composer.json |
Raises the PHPStan development dependency to the 2.x line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if( isset($this->server[$portKey]) && is_numeric($this->server[$portKey]) ) { | ||
| $port = (int)$this->server[$portKey]; |
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)