-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Update dependency vimeo/psalm to v5 - abandoned #62
base: 1.24.x
Are you sure you want to change the base?
Conversation
Check for cluster connection Check for cluster health Returns responsetime along with success/warning/failure. Uses elasticsearch-php package - Supports both v7 and v8 as both ES versions are still supported by Elastic Signed-off-by: Bram Leeda <[email protected]>
…uster health status Signed-off-by: Bram Leeda <[email protected]>
8630ff2
to
4bc08e6
Compare
5f33748
to
8a47543
Compare
Add extra assertions for the ElasticSearch check result data
Add new ElasticSearch check
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. |
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 targeting a new major, aren't these ctor signature changes a BC break? If existing subclasses extend the ctor, won't they also need to make this change?
<?php
interface A {}
interface B {}
class NeedsA {
function __construct(A $a) {}
}
class NeedsB extends NeedsA {
function __construct(B $b) {}
}
var_dump(new NeedsB(new class implements B {})); |
2996f40
to
a1577d7
Compare
🤯 |
Signed-off-by: Renovate Bot <[email protected]>
| datasource | package | from | to | | ---------- | ----------- | ------ | ----- | | packagist | vimeo/psalm | 4.30.0 | 5.1.0 | Signed-off-by: Renovate Bot <[email protected]>
…structors This mostly replaces many docblock-only union types with PHP 8 union types (now usable), and removes many `Traversable` inputs where unusable. Specifically, in order to operate properly, many of these checks do things like `$this->settings[0]` or `count($this->settings)`, even in happy path scenarios, leading to invalid execution. This means that the accepted input type is not `array|Traversable` for many of our checks, but rather `non-empty-list` or stricter. While this could potentially mean that this is a BC break, these checks did **NOT** work, when a `Traversable` was given as input, and the errors change from being an `Exception` to being a more specific `TypeError`. Tests verifying impossible types/scenarios have been removed.
a1577d7
to
d53fc6c
Compare
PHP 8.2 failing puzzles me 🤔 |
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 assume a lot of those removed tests are no longer necessary thanks to psalm and type checks?
protected $files; | ||
|
||
/** | ||
* @param string|array|Traversable $files Path name or an array / Traversable of paths | ||
* @param iterable<string>|string $files Path name or an array / Traversable of paths | ||
* @throws InvalidArgumentException |
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 could be removed now that it's a type check
* @throws InvalidArgumentException | ||
*/ | ||
public function __construct($callback, $params = []) | ||
/** @throws InvalidArgumentException */ |
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 could be removed now that it's a type check
@@ -120,11 +120,11 @@ public static function calcPi($precision) | |||
$limit = ceil(log($precision) / log(2)) - 1; | |||
bcscale($precision + 6); | |||
$a = 1; | |||
$b = bcdiv(1, bcsqrt(2)); | |||
$b = bcdiv('1', bcsqrt(2)); |
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.
$b = bcdiv('1', bcsqrt(2)); | |
$b = bcdiv('1', bcsqrt('2')); |
$t = 1 / 4; | ||
$p = 1; | ||
for ($n = 0; $n < $limit; $n++) { | ||
$x = bcdiv(bcadd($a, $b), 2); | ||
$x = bcdiv(bcadd($a, $b), '2'); | ||
$y = bcsqrt(bcmul($a, $b)); | ||
$t = bcsub($t, bcmul($p, bcpow(bcsub($a, $x), 2))); |
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.
$t = bcsub($t, bcmul($p, bcpow(bcsub($a, $x), 2))); | |
$t = bcsub($t, bcmul($p, bcpow(bcsub($a, $x), '2'))); |
@@ -23,64 +18,47 @@ | |||
* | |||
* This test accepts a single version and an operator or an array of | |||
* versions to test for. | |||
* | |||
* @psalm-type Operator = '<'|'lt'|'<='|'le'|'>'|'gt'|'>='|'ge'|'=='|'='|'eq'|'!='|'<>'|'ne' |
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.
* @psalm-type Operator = '<'|'lt'|'<='|'le'|'>'|'gt'|'>='|'ge'|'=='|'='|'eq'|'!='|'<>'|'ne' | |
* @psalm-type Operator = value-of<self::VALID_OPERATORS> |
The result would be the same and this could be reused later on?
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.
True that 👍
@@ -214,17 +215,13 @@ public function run($checkAlias = null) | |||
/** | |||
* Set config values from an array. | |||
* | |||
* @param array|Traversable $config | |||
* @param iterable<string, mixed> $config | |||
* @throws InvalidArgumentException |
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.
Could be removed, no longer thrown.
Seems like PHP 8.2 considers a |
@@ -51,19 +49,14 @@ public function __construct($lockFilePath = null) | |||
)); | |||
} | |||
|
|||
if (! $lockFilePath) { | |||
if ($lockFilePath === null) { |
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.
if ($lockFilePath === null) { | |
if ($lockFilePath === null || $lockFilePath === '') { |
Maybe also check for an empty string here
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.
Nothing to add to @internalsystemerror review, otherwise LGTM!
* @param string|array|Traversable $expectedVersion The expected version | ||
* @param string $operator One of: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne | ||
* @param string|iterable<array-key, string> $expectedVersion The expected version | ||
* @param value-of<self::VALID_OPERATORS> $operator |
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.
Just @param Operator $operator
?
Thought some more about this: needs to revert the That's because Don't have the energy for it though :D |
How about skipping that public function __construct(string|iterable $path)
{
$this->path = is_string($path) ? [$path] : [...$path];
} If |
I don't think it's a heavy cast: we expect this to be configuration, not large data. If that works for iterable types, I'll just have to add tests for it. |
Autoclosing SkippedThis PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error. |
Is anybody still working on this? |
This PR contains the following updates:
^4.29.0
->^5.0.0
Release Notes
vimeo/psalm
v5.2.0
Compare Source
What's Changed
Features
true
in native types by @weirdan in https://github.com/vimeo/psalm/pull/8875Fixes
Internal changes
Typos
New Contributors
Full Changelog: vimeo/psalm@5.1.0...5.2.0
v5.1.0
Compare Source
What's Changed
Deprecations
Features
Fixes
Docs
5
requires PHP >= 7.4 by @sasezaki in https://github.com/vimeo/psalm/pull/8805forbiddenFunctions
config option by @p810 in https://github.com/vimeo/psalm/pull/8808New Contributors
Full Changelog: vimeo/psalm@5.0.0...5.1.0
v5.0.0
: Psalm 5Compare Source
Welcome to Psalm 5!
There's an accompanying post on psalm.dev, written by @muglug & the current maintainers of Psalm.
What's Changed
Removed
CodeIssue
methods by @weirdan in https://github.com/vimeo/psalm/pull/7276DocComment
methods by @weirdan in https://github.com/vimeo/psalm/pull/7278THtmlEscapedString
by @weirdan in https://github.com/vimeo/psalm/pull/7285Features
getimagesize
as SSRF sink by @mal-tee in https://github.com/vimeo/psalm/pull/7504@psalm-check-type
and@psalm-check-type-exact
. by @AndrolGenhald in https://github.com/vimeo/psalm/pull/7686value-of
to work with backed enums (fixes #7874). by @AndrolGenhald in https://github.com/vimeo/psalm/pull/8283new
on objects by @weirdan in https://github.com/vimeo/psalm/pull/8723Fixes
@psalm-generator-return
annotation by @jrmajor in https://github.com/vimeo/psalm/pull/7853CachingIterator::getCache
stub. by @drupol in https://github.com/vimeo/psalm/pull/8282Any
assertion is used by @pvandommelen in https://github.com/vimeo/psalm/pull/8494json_encode()
always produce anon-empty-string
, when successful by @Ocramius in https://github.com/vimeo/psalm/pull/8681DeprecatedInterface
when interface is referenced in a generic by @weirdan in https://github.com/vimeo/psalm/pull/8687stringable-object
equivalent toStringable
by @weirdan in https://github.com/vimeo/psalm/pull/8688@psalm-consistent-constructor
in function docblocks by @weirdan in https://github.com/vimeo/psalm/pull/8713humbug/box
by @weirdan in https://github.com/vimeo/psalm/pull/8770Docs
html-escaped-string
docs by @weirdan in https://github.com/vimeo/psalm/pull/7281Internal changes
@internal
annotation onPsalm\Internal
symbols by @weirdan in https://github.com/vimeo/psalm/pull/7268TypeAnalyzer
methods by @weirdan in https://github.com/vimeo/psalm/pull/7277getPsalmHelpText()
toCli\Psalm
by @weirdan in https://github.com/vimeo/psalm/pull/7280webmozart/path-util
by @weirdan in https://github.com/vimeo/psalm/pull/7292array<never, never>
as a way to detect empty arrays by a dedicated method by @orklah in https://github.com/vimeo/psalm/pull/7313resolveSymlinks
option for project directories by @dvz in https://github.com/vimeo/psalm/pull/7163array_fill_keys()
by @weirdan in https://github.com/vimeo/psalm/pull/7661Clause::$hash
type by @weirdan in https://github.com/vimeo/psalm/pull/8742phpspec/prophecy
tomockery/mockery
by @weirdan in https://github.com/vimeo/psalm/pull/8755slevomat/coding-standard
by @weirdan in https://github.com/vimeo/psalm/pull/8783Typos
Other changes
New Contributors
Full Changelog: vimeo/psalm@4.30.0...5.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.