-
Notifications
You must be signed in to change notification settings - Fork 664
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
Fix parameter having object
type in PHPDoc and only &
in the method's definition, used with code having an object calling it's method with itself as an argument for mentioned parameter
#10104
Merged
weirdan
merged 2 commits into
vimeo:5.x
from
6b7562617765726c6f73:fix_MethodCallAnalyzer
Aug 12, 2023
Merged
Conversation
This file contains 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
I found these snippets: https://psalm.dev/r/3374fc1feb<?php
class Foo {
/**
* @param object $o
*/
public function bar(&$o): void {}
}
$x = new Foo();
$x->bar($x);
|
weirdan
approved these changes
Aug 12, 2023
weirdan
added
causes crash
release:fix
The PR will be included in 'Fixes' section of the release notes
labels
Aug 12, 2023
Thanks! |
oguzhand95
referenced
this pull request
in cerbos/cerbos-sdk-php
Aug 21, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [google/protobuf](https://developers.google.com/protocol-buffers/) ([source](https://togithub.com/protocolbuffers/protobuf-php)) | require | minor | `3.23.4` -> `3.24.1` | | [grpc/grpc](https://grpc.io) ([source](https://togithub.com/grpc/grpc-php)) | require | minor | `1.52.0` -> `1.57.0` | | [phpstan/phpstan](https://togithub.com/phpstan/phpstan) | require-dev | patch | `1.10.27` -> `1.10.29` | | [phpunit/phpunit](https://phpunit.de/) ([source](https://togithub.com/sebastianbergmann/phpunit)) | require-dev | patch | `10.3.1` -> `10.3.2` | | [vimeo/psalm](https://togithub.com/vimeo/psalm) | require-dev | minor | `5.14.1` -> `5.15.0` | --- ### Release Notes <details> <summary>protocolbuffers/protobuf-php (google/protobuf)</summary> ### [`v3.24.1`](https://togithub.com/protocolbuffers/protobuf-php/compare/v3.24.0...v3.24.1) [Compare Source](https://togithub.com/protocolbuffers/protobuf-php/compare/v3.24.0...v3.24.1) ### [`v3.24.0`](https://togithub.com/protocolbuffers/protobuf-php/compare/v3.23.4...v3.24.0) [Compare Source](https://togithub.com/protocolbuffers/protobuf-php/compare/v3.23.4...v3.24.0) </details> <details> <summary>grpc/grpc-php (grpc/grpc)</summary> ### [`v1.57.0`](https://togithub.com/grpc/grpc-php/compare/v1.52.0...v1.57.0) [Compare Source](https://togithub.com/grpc/grpc-php/compare/v1.52.0...v1.57.0) </details> <details> <summary>phpstan/phpstan (phpstan/phpstan)</summary> ### [`v1.10.29`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.29) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.10.28...1.10.29) # Improvements 🔧 - Update nikic/php-parser to v4.17.1 - PHP 8.3 features are no longer parse errors. Full-fledged PHP 8.3 support is coming later this year. - Update BetterReflection to 6.12.0 # Bugfixes 🐛 - PHPStan Pro - when launching, `PHP_BINARY` needs to be escaped (phpstan/phpstan-src@2c7cfd8) # Function signature fixes 🤖 - Fix FTP-related function signatures ([#​2551](https://togithub.com/phpstan/phpstan-src/pull/2551)), thanks [@​thg2k](https://togithub.com/thg2k)! ### [`v1.10.28`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.28) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.10.27...1.10.28) # Improvements 🔧 - Update BetterReflection to 6.12.0 (phpstan/phpstan-src@7c49c94) # Bugfixes 🐛 - Nullsafe operator on `null` results in `null` (phpstan/phpstan-src@5c40c85), [#​9721](https://togithub.com/phpstan/phpstan/issues/9721) - Properties set in the native constructor are initialized in additional constructors (phpstan/phpstan-src@1b0c6a0), [#​9619](https://togithub.com/phpstan/phpstan/issues/9619) - Fix performance problem with nested BooleanOr and BooleanAnd (phpstan/phpstan-src@9adae6c), [#​9690](https://togithub.com/phpstan/phpstan/issues/9690), [#​9676](https://togithub.com/phpstan/phpstan/issues/9676) - CallableTypeHelper - copy variadic parameters if the accepting closure has more parameters (phpstan/phpstan-src@31ed326), [#​9699](https://togithub.com/phpstan/phpstan/issues/9699) # Internals 🔍 - Simplify access to ClassReflection in ClassPropertyNode ([#​2565](https://togithub.com/phpstan/phpstan-src/pull/2565)), thanks [@​mad-briller](https://togithub.com/mad-briller)! </details> <details> <summary>sebastianbergmann/phpunit (phpunit/phpunit)</summary> ### [`v10.3.2`](https://togithub.com/sebastianbergmann/phpunit/compare/10.3.1...10.3.2) [Compare Source](https://togithub.com/sebastianbergmann/phpunit/compare/10.3.1...10.3.2) </details> <details> <summary>vimeo/psalm (vimeo/psalm)</summary> ### [`v5.15.0`](https://togithub.com/vimeo/psalm/releases/tag/5.15.0) [Compare Source](https://togithub.com/vimeo/psalm/compare/5.14.1...5.15.0) <!-- Release notes generated using configuration in .github/release.yml at 5.x --> #### What's Changed ##### Features - Check if argument passed to isset() is not a variable by [@​Nitamet](https://togithub.com/Nitamet) in [https://github.com/vimeo/psalm/pull/10068](https://togithub.com/vimeo/psalm/pull/10068) - Fix [#​9997](https://togithub.com/vimeo/psalm/issues/9997) dynamic properties on SimpleXmlElement by [@​ygottschalk](https://togithub.com/ygottschalk) in [https://github.com/vimeo/psalm/pull/10049](https://togithub.com/vimeo/psalm/pull/10049) - Nicer PHP version checking by [@​Nitamet](https://togithub.com/Nitamet) in [https://github.com/vimeo/psalm/pull/10129](https://togithub.com/vimeo/psalm/pull/10129) ##### Fixes - Fixed `DOMDocument::load*` signatures by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10073](https://togithub.com/vimeo/psalm/pull/10073) - make (s)printf error reporting more correct/literal by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10088](https://togithub.com/vimeo/psalm/pull/10088) - Fix parameter having `object` type in PHPDoc and only `&` in the method's definition, used with code having an object calling it's method with itself as an argument for mentioned parameter by [@​kubawerlos](https://togithub.com/kubawerlos) in [https://github.com/vimeo/psalm/pull/10104](https://togithub.com/vimeo/psalm/pull/10104) - mysqli_field_seek returns true by [@​kamil-tekiela](https://togithub.com/kamil-tekiela) in [https://github.com/vimeo/psalm/pull/10107](https://togithub.com/vimeo/psalm/pull/10107) - Fix bcdiv nullable scale stub by [@​TheDevick](https://togithub.com/TheDevick) in [https://github.com/vimeo/psalm/pull/10106](https://togithub.com/vimeo/psalm/pull/10106) - Cleanup `test` command and `fixAll` action by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10108](https://togithub.com/vimeo/psalm/pull/10108) - Correct type for `$enum->name` by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10109](https://togithub.com/vimeo/psalm/pull/10109) - argv and argc were inconsistent in Context with VariableFetchAnalyzer by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10093](https://togithub.com/vimeo/psalm/pull/10093) - Fix `hash_pbkdf2` `$options` parameter by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10110](https://togithub.com/vimeo/psalm/pull/10110) - Forbid faulty `nikic/php-parser` version by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10112](https://togithub.com/vimeo/psalm/pull/10112) - `strip_tags()/$allowed_tags` can accept arrays since 7.4 by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10122](https://togithub.com/vimeo/psalm/pull/10122) - Fix crash when assertion array is not a list by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10123](https://togithub.com/vimeo/psalm/pull/10123) - Fix crash on array access to undefined class by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10134](https://togithub.com/vimeo/psalm/pull/10134) - Correct exit code for invalid version format by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10135](https://togithub.com/vimeo/psalm/pull/10135) #### New Contributors - [@​Nitamet](https://togithub.com/Nitamet) made their first contribution in [https://github.com/vimeo/psalm/pull/10068](https://togithub.com/vimeo/psalm/pull/10068) - [@​TheDevick](https://togithub.com/TheDevick) made their first contribution in [https://github.com/vimeo/psalm/pull/10106](https://togithub.com/vimeo/psalm/pull/10106) **Full Changelog**: vimeo/psalm@5.14.1...5.15.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/cerbos/cerbos-sdk-php). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Oğuzhan Durgun <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
tcarrio
referenced
this pull request
in open-feature/php-sdk
Sep 21, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vimeo/psalm](https://togithub.com/vimeo/psalm) | require-dev | minor | `~5.14.0` -> `~5.15.0` | --- ### Release Notes <details> <summary>vimeo/psalm (vimeo/psalm)</summary> ### [`v5.15.0`](https://togithub.com/vimeo/psalm/releases/tag/5.15.0) [Compare Source](https://togithub.com/vimeo/psalm/compare/5.14.1...5.15.0) <!-- Release notes generated using configuration in .github/release.yml at 5.x --> #### What's Changed ##### Features - Check if argument passed to isset() is not a variable by [@​Nitamet](https://togithub.com/Nitamet) in [https://github.com/vimeo/psalm/pull/10068](https://togithub.com/vimeo/psalm/pull/10068) - Fix [#​9997](https://togithub.com/vimeo/psalm/issues/9997) dynamic properties on SimpleXmlElement by [@​ygottschalk](https://togithub.com/ygottschalk) in [https://github.com/vimeo/psalm/pull/10049](https://togithub.com/vimeo/psalm/pull/10049) - Nicer PHP version checking by [@​Nitamet](https://togithub.com/Nitamet) in [https://github.com/vimeo/psalm/pull/10129](https://togithub.com/vimeo/psalm/pull/10129) ##### Fixes - Fixed `DOMDocument::load*` signatures by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10073](https://togithub.com/vimeo/psalm/pull/10073) - make (s)printf error reporting more correct/literal by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10088](https://togithub.com/vimeo/psalm/pull/10088) - Fix parameter having `object` type in PHPDoc and only `&` in the method's definition, used with code having an object calling it's method with itself as an argument for mentioned parameter by [@​kubawerlos](https://togithub.com/kubawerlos) in [https://github.com/vimeo/psalm/pull/10104](https://togithub.com/vimeo/psalm/pull/10104) - mysqli_field_seek returns true by [@​kamil-tekiela](https://togithub.com/kamil-tekiela) in [https://github.com/vimeo/psalm/pull/10107](https://togithub.com/vimeo/psalm/pull/10107) - Fix bcdiv nullable scale stub by [@​TheDevick](https://togithub.com/TheDevick) in [https://github.com/vimeo/psalm/pull/10106](https://togithub.com/vimeo/psalm/pull/10106) - Cleanup `test` command and `fixAll` action by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10108](https://togithub.com/vimeo/psalm/pull/10108) - Correct type for `$enum->name` by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10109](https://togithub.com/vimeo/psalm/pull/10109) - argv and argc were inconsistent in Context with VariableFetchAnalyzer by [@​kkmuffme](https://togithub.com/kkmuffme) in [https://github.com/vimeo/psalm/pull/10093](https://togithub.com/vimeo/psalm/pull/10093) - Fix `hash_pbkdf2` `$options` parameter by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10110](https://togithub.com/vimeo/psalm/pull/10110) - Forbid faulty `nikic/php-parser` version by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10112](https://togithub.com/vimeo/psalm/pull/10112) - `strip_tags()/$allowed_tags` can accept arrays since 7.4 by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10122](https://togithub.com/vimeo/psalm/pull/10122) - Fix crash when assertion array is not a list by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10123](https://togithub.com/vimeo/psalm/pull/10123) - Fix crash on array access to undefined class by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10134](https://togithub.com/vimeo/psalm/pull/10134) - Correct exit code for invalid version format by [@​weirdan](https://togithub.com/weirdan) in [https://github.com/vimeo/psalm/pull/10135](https://togithub.com/vimeo/psalm/pull/10135) #### New Contributors - [@​Nitamet](https://togithub.com/Nitamet) made their first contribution in [https://github.com/vimeo/psalm/pull/10068](https://togithub.com/vimeo/psalm/pull/10068) - [@​TheDevick](https://togithub.com/TheDevick) made their first contribution in [https://github.com/vimeo/psalm/pull/10106](https://togithub.com/vimeo/psalm/pull/10106) **Full Changelog**: vimeo/psalm@5.14.1...5.15.0 </details> --- ### 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 becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-feature/php-sdk). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40My4yIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Sorry for the title, see the explanation below:
Having such code:
will result in internal Psalm error.
object
from PHPDoc, or&
from the function's definition, or$x
to method of$x
will result in Psalm not crashing, so this is quite an edge case.