-
-
Notifications
You must be signed in to change notification settings - Fork 74
Update dependency vimeo/psalm to v6 #209
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
|
10039d2 to
7ea0f96
Compare
7ea0f96 to
efa869a
Compare
efa869a to
d98f502
Compare
| datasource | package | from | to | | ---------- | ----------- | ------ | ------ | | packagist | vimeo/psalm | 5.26.1 | 6.13.1 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
…ype safety Signed-off-by: Aleksei Khudiakov <[email protected]>
Signed-off-by: Aleksei Khudiakov <[email protected]>
d98f502 to
37b2062
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
| * @param string $header Case-insensitive header name. | ||
| * @param string $name Case-insensitive header name. | ||
| * @return bool Returns true if any header names match the given header | ||
| * name using a case-insensitive string comparison. Returns false if | ||
| * no matching header name is found in the message. | ||
| */ | ||
| public function hasHeader(string $header): bool | ||
| public function hasHeader(string $name): bool | ||
| { | ||
| return isset($this->headerNames[strtolower($header)]); | ||
| return isset($this->headerNames[strtolower($name)]); |
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.
Change to parameter name trips BC checker.
It did not match the PSR interface and it is only a BC break with named arguments.
I consider this a minor bugfix if anything.
|
@gsteel have you seen this amphp related deprecation failure on php 8.4 before? |
|
I see. This is triggered due to Declaring conflict with the amphp package is not a good idea. |
79245bd to
37b2062
Compare
| */ | ||
| public function getSize(): int | ||
| #[Override] | ||
| public function getSize(): ?int |
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.
This is a bug that inadvertently narrowed interface return type. Technically a BC break so it trips BC checker.
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.
I would say that the interface already declared ?int, so we're good: this is final, so there's almost no effect for downstream, unless they explicitly type against RelativeStream.
I'd say it's fine to keep the target merge into 3.x, and release there with the BC break label attached for clarity 👍
|
In the past I've just conflicted with amp/whatever to get an 8.4 compatible version |
…o transient dependency amphp is required by psalm 6 but in CI with lowest dependencies on PHP 8.4 phpunit tests fail in subprocess due to unrelated amphp deprecation notices. Signed-off-by: Aleksei Khudiakov <[email protected]>
164435a to
95b779e
Compare
|
I can mask the issue by going away with isolated process since only couple tests use it and globals are restored by phpunit between tests. |
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.
LGTM, 🚢
| */ | ||
| public function getSize(): int | ||
| #[Override] | ||
| public function getSize(): ?int |
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.
I would say that the interface already declared ?int, so we're good: this is final, so there's almost no effect for downstream, unless they explicitly type against RelativeStream.
I'd say it's fine to keep the target merge into 3.x, and release there with the BC break label attached for clarity 👍
| * in order to return a new request that composes a URI instance that reflects | ||
| * those headers. | ||
| * | ||
| * @psalm-immutable |
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.
Not super happy about this immutability removal, but OK with proceeding with it, for now
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.
Yeah.
Psalm was treating methods as pure and complained about all other calls for whatever reason. I figured it was easier to drop annotation as it does not provide too much of a value here anyway.
Stuff like this:
ERROR: ImpureMethodCall - src/ServerRequestFilter/FilterUsingXForwardedHeaders.php:77:41 - Cannot call a possibly-mutating method Psr\Http\Message\ServerRequestInterface::getUri from a mutation-free context (see https://psalm.dev/203)
$uri = $originalUri = $request->getUri();
ERROR: ImpureMethodCall - src/ServerRequestFilter/FilterUsingXForwardedHeaders.php:79:33 - Cannot call a possibly-mutating method Psr\Http\Message\ServerRequestInterface::getHeaderLine from a mutation-free context (see https://psalm.dev/203)
$header = $request->getHeaderLine($headerName);
ERROR: ImpureMethodCall - src/ServerRequestFilter/FilterUsingXForwardedHeaders.php:105:30 - Cannot call a possibly-mutating method Psr\Http\Message\ServerRequestInterface::withUri from a mutation-free context (see https://psalm.dev/203)
return $request->withUri($uri);
|
Thanks @Xerkus! |
This PR contains the following updates:
^5.26.1->^6.0.0Release Notes
vimeo/psalm (vimeo/psalm)
v6.13.1Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.13.0...6.13.1
v6.13.0Compare Source
What's Changed
Features
iterator_to_arrayby @andrew-demb in #11430arrayCacheconfiguration key that can be used to disable the newly introduced array cache: this will slightly slow down execution times while reducing RAM usage, avoiding OOM issues on bigger codebases by @danogFull Changelog: vimeo/psalm@6.12.1...6.13.0
v6.12.1Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.12.0...6.12.1
v6.12.0: - Cache refactoringCompare Source
This release features a major cache refactoring, improving stability, removing race conditions and adding a new feature called cache consolidation, which consolidates the cache, normally composed of split files, into one single file with the
--consolidate-cacheflag, for quicker runs when doing whole project scans!To use cache consolidation, simply run Psalm with the
--consolidate-cacheflag after running a normal analysis: running with this flag will skip analysis and only consolidate the cache.If you consolidate your cache in CI runs, sure to re-consolidate the cache again after running Psalm before re-saving the updated cache.
What's Changed
Features
Fixes
Docs
numericsupertype by @kylekatarnls in #11444New Contributors
Full Changelog: vimeo/psalm@6.11.0...6.12.0
v6.11.0Compare Source
What's Changed
Features
ClassFilePathProviderInterfaceplugin hook to polyfill custom autoloaders by @danog in #11422Fixes
Subscribe to the brand new Psalm newsletter to stay up to date with all of Psalm's news!
Full Changelog: vimeo/psalm@6.10.3...6.11.0
v6.10.3Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.10.2...6.10.3
v6.10.2Compare Source
What's Changed
Fixes
New Contributors
Full Changelog: vimeo/psalm@6.10.1...6.10.2
v6.10.1Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.10.0...6.10.1
v6.10.0Compare Source
Join the new official Psalm news channel and the Psalm community!
The news channel will be used to share inside exclusive news about upcoming Psalm features (including property hook support, coming within the next few releases!), and the community group can be used to discuss and share the way you use Psalm!
What's Changed
Features
Full Changelog: vimeo/psalm@6.9.6...6.10.0
v6.9.6Compare Source
Add git, ssh and composer to the docker image by @danog.
Full Changelog: vimeo/psalm@6.9.5...6.9.6
v6.9.5Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.9.4...6.9.5
v6.9.4Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.9.3...6.9.4
v6.9.3Compare Source
What's Changed
Fixes
Internal changes
Full Changelog: vimeo/psalm@6.9.2...6.9.3
v6.9.2Compare Source
Fixes multiplatform builds for the
latesttag of the docker image ».Full Changelog: vimeo/psalm@6.9.1...6.9.2
v6.9.1Compare Source
v6.9.0: - Docker image!Compare Source
Psalm now has an official docker image!
It uses a custom build of PHP built from scratch, running Psalm +30% faster on average than normal PHP (+50% faster if comparing to PHP without opcache installed).
To use it, simply run:
docker run -v $PWD:/app --rm -it ghcr.io/danog/psalm:latest /composer/vendor/bin/psalm --no-cacheIssues due to missing extensions can be fixed by enabling them in psalm.xml and/or requiring them in composer.json, see here » for more info.
Extensions not stubbed by Psalm itself (and thus not available as a psalm config option) may be stubbed using traditional PHP stubs.
What's Changed
Features
Full Changelog: vimeo/psalm@6.8.9...6.9.0
v6.8.9Compare Source
What's Changed
Fixes
Internal changes
Full Changelog: vimeo/psalm@6.8.8...6.8.9
v6.8.8Compare Source
What's Changed
Fixes
Internal changes
Full Changelog: vimeo/psalm@6.8.7...6.8.8
v6.8.7Compare Source
What's Changed
Fixes
list{0: int, 1?: int}etc. by @MoonE in #11150Full Changelog: vimeo/psalm@6.8.6...6.8.7
v6.8.6Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.8.5...6.8.6
v6.8.5Compare Source
What's Changed
Fixes
@danogFull Changelog: vimeo/psalm@6.8.4...6.8.5
v6.8.4Compare Source
This release introduces fully reproducible builds (the composer.lock file is now added to phars).
Full Changelog: vimeo/psalm@6.8.3...6.8.4
v6.8.3Compare Source
What's Changed
Fixes
Internal changes
Full Changelog: vimeo/psalm@6.8.2...6.8.3
v6.8.2Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.8.1...6.8.2
v6.8.1Compare Source
What's Changed
Internal changes
Full Changelog: vimeo/psalm@6.8.0...6.8.1
v6.8.0Compare Source
What's Changed
Features
Fixes
New Contributors
Full Changelog: vimeo/psalm@6.7.1...6.8.0
v6.7.1Compare Source
What's Changed
Internal changes
Full Changelog: vimeo/psalm@6.7.0...6.7.1
v6.7.0Compare Source
What's Changed
Features
allowBoolToLiteralBoolComparisonconfig (disabled by default), used to control emission ofRedundantIdentityWithTrueissues (previously, their emission was controlled by thestrictBinaryOperandsconfig) by @danog in #11283#[Override]attribute detection (automatic Psalter fixer available) by @danog in #11283@methodor@property, see here for more info by @danog in #11283@psalm-suppress allannotation (may be re-enabled manually with the disableSuppressAll config) by @danog in #11283Fixes
Internal changes
New Contributors
Full Changelog: vimeo/psalm@6.6.2...6.7.0
v6.6.2Compare Source
What's Changed
Fixes
Full Changelog: vimeo/psalm@6.6.1...6.6.2
v6.6.1Compare Source
What's Changed
Fixes
Docs
Full Changelog: vimeo/psalm@6.6.0...6.6.1
v6.6.0Compare Source
What's Changed
Features
Fixes
Docs
Internal changes
Full Changelog: vimeo/psalm@6.5.1...6.6.0
v6.5.1Compare Source
What's Changed
Fixes
symfony/filesystemby @weirdan in #11273Internal changes
Full Changelog: vimeo/psalm@6.5.0...6.5.1
v6.5.0Compare Source
What's Changed
Features
disableVarParsingconfig by @danogFixes
Full Changelog: vimeo/psalm@6.4.1...6.5.0
v6.4.1Compare Source
What's Changed
Fixes
Internal changes
New Contributors
Full Changelog: vimeo/psalm@6.4.0...6.5.0
v6.4.0Compare Source
What's Changed
Features
Fixes
Full Changelog: vimeo/psalm@6.3.0...6.4.0
v6.3.0Compare Source
This release adds the new psalm-review tool!
What's Changed
Features
Fixes
Full Changelog: vimeo/psalm@6.2.0...6.3.0
v6.2.0Compare Source
This release was possible thanks to a Psalm support contract!
This release adds the new LiteralKeyUnshapedArray issue, controlled by the disallowLiteralKeysOnUnshapedArrays configuration flag (false by default), useful to enforce usage of shaped arrays instead of generic arrays.
What's Changed
Features
Fixes
Full Changelog: vimeo/psalm@6.1.0...6.2.0
v6.1.0Compare Source
This release was possible thanks to a Psalm support contract!
This release greatly improves multithreaded mode, fixing some nasty issues and greatly improving efficiency, thanks to efficient task scheduling powered by amphp/parallel (& some custom code to allow usage of copy-on-write optimizations with forks instead of spawning new processes).
This release also adds a runtime check to prevent Psalm from running on Linux systems where VM overcommitting is disabled: Psalm makes heavy use of VM overcommitting (specifically during forking in multithreaded mode) to greatly reduce RAM usage and improve performance.
Note that in the vast majority of Linux systems, VM overcommitting is already enabled by default.
What's Changed
Features
Fixes
Internal changes
Other changes
Full Changelog: vimeo/psalm@6.0.0...6.1.0
v6.0.0: Psalm v6Compare Source
This is the first release of Psalm v6!
Users are encouraged to switch to Psalm v6 right away, as v5 is not supported anymore.
Also announcing Psalm's new support model: you can support Psalm development by requesting a support contract from Daniil Gentili, the only active maintainer of Psalm.
Support contracts can cover full integration of Psalm into existing codebases, support for Psalm issues and development of additional Psalm features.
See here » for info, pricing and contact information.
Main highlights of Psalm v6:
ignoreInternalFunctionFalseReturnandignoreInternalFunctionNullReturnare nowfalseby default: this means Psalm now warns when a false/null return type of a native function is not explicitly checked.Plugin authors should consult the changelog for info about BC-breaking changes.
What's Changed
Features
DuplicatePropertyissue by @tuqqu in #10265Fixes
Docs
@psalm-internaldocumentation example by @still-dreaming-1 in #10467Internal changes
TLiteralFloat::$valueandTLiteralInt::$valuetyped by @weirdan in #9517initialized_methodsContext property by @theodorejb in #10610masterfrom5.xby @weirdan in #10775masterfrom5.xby @weirdan in #10803Typos
Other changes
New Contributors
Full Changelog: vimeo/psalm@5.26.1...6.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Read more information about the use of Renovate Bot within Laminas.