Skip to content
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 master from 5.x #10656

Merged
merged 37 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6aa2ddf
Fix ownerDocument type
fluffycondor Jan 31, 2024
abe7ae8
Merge pull request #10619 from fluffycondor/fix-ownerdocument-null
weirdan Jan 31, 2024
551625a
Fix https://github.com/vimeo/psalm/issues/10561 numeric input incorre…
kkmuffme Jan 31, 2024
7023855
add scalar & numeric handling for all cases where appropriate and ens…
kkmuffme Jan 31, 2024
215d62e
Merge pull request #10621 from kkmuffme/fix-numeric-scalar-validate-f…
weirdan Jan 31, 2024
9ec556b
Allow inline comments in typedef shapes
weirdan Jan 31, 2024
4fdfbac
Merge pull request #10623 from weirdan/allow-inline-comments-in-typed…
weirdan Jan 31, 2024
6140f68
Allow typedef imports from any classlike type
weirdan Jan 31, 2024
138c7b8
Fix baseline loading for path specified on the command line
weirdan Feb 1, 2024
8c473e2
Merge pull request #10628 from weirdan/fix-baseline-usage-with-paths-…
weirdan Feb 1, 2024
0082207
Merge branch '5.21.x' into 5.x
weirdan Feb 1, 2024
76364ab
Stable baseline
weirdan Feb 1, 2024
38d7d43
Merge pull request #10625 from weirdan/allow-typedef-imports-from-any…
weirdan Feb 1, 2024
421cb0f
Allow enum cases to be global constants
robchett Nov 2, 2023
fc88ef2
Merge pull request #10634 from weirdan/10334-global-constants-as-case…
weirdan Feb 1, 2024
1698239
CallMap: Adjust return type for `inotify_add_watch()` to `int|false`
UlrichEckhardt Feb 2, 2024
9fd17cf
CallMap: Improve returntype annotation for `inotify_read()`
UlrichEckhardt Feb 2, 2024
4fc3594
Allow sebastian/diff v6
simPod Feb 2, 2024
9a970ca
Update our actual baseline to use the new format
weirdan Feb 3, 2024
192f7b9
Merge pull request #10633 from weirdan/stable-baseline
weirdan Feb 3, 2024
a2980b5
Drop unused local composer repo
weirdan Feb 3, 2024
526013e
Fix check-type when using reserved types from within a namespace
robchett Feb 3, 2024
9d4fd40
Support user defined types for psalm-check-type
robchett Feb 3, 2024
c1400b8
Merge pull request #10647 from weirdan/drop-echo-checker-repo
weirdan Feb 3, 2024
90362df
Merge pull request #10639 from simPod/diff
weirdan Feb 3, 2024
74314eb
Merge pull request #10637 from UlrichEckhardt/fix/issue-10636-inotify…
weirdan Feb 3, 2024
080c8f6
Merge pull request #10648 from robchett/check_type_namespace_allow_re…
weirdan Feb 3, 2024
07f4045
Add InvalidOverride issue
edsrzf Feb 3, 2024
ea9cb44
Emit InvalidOverride
edsrzf Feb 3, 2024
3b8d81b
Merge pull request #10644 from edsrzf/invalid-override
weirdan Feb 3, 2024
7c7c216
Clarify that Pull request labels failure is to be resolved by maintai…
weirdan Feb 3, 2024
59df6a7
Merge pull request #10649 from weirdan/ci-clarify-pull-request-labels…
weirdan Feb 3, 2024
e8b47f7
Do not add `callable` as a native property type
weirdan Feb 4, 2024
b2a2cd7
Allow adding `Closure` as a native property type
weirdan Feb 4, 2024
9ac2383
Merge pull request #10654 from weirdan/10650-do-not-add-callable-as-n…
weirdan Feb 4, 2024
7bfdf7d
Merge branch '5.x' into update-master
weirdan Feb 5, 2024
49f5c99
Add missing strict_types
weirdan Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request Labels
name: Pull Request Labels (to be added by maintainers)
on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
Expand Down
14 changes: 4 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0",
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
"nikic/php-parser": "^5.0.0",
"sebastian/diff": "^4.0 || ^5.0",
"sebastian/diff": "^4.0 || ^5.0 || ^6.0",
"spatie/array-to-xml": "^2.17.0 || ^3.0",
"symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0",
"symfony/filesystem": "^5.4 || ^6.0 || ^7.0"
Expand Down Expand Up @@ -93,12 +93,6 @@
"Psalm\\Tests\\": "tests/"
}
},
"repositories": [
{
"type": "path",
"url": "examples/plugins/composer-based/echo-checker"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"bin": [
Expand Down Expand Up @@ -140,8 +134,8 @@
"tests": "Runs all available tests."
},
"support": {
"docs": "https://psalm.dev/docs",
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm"
"docs": "https://psalm.dev/docs",
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm"
}
}
1 change: 1 addition & 0 deletions config.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
<xs:element name="InvalidNamedArgument" type="ArgumentIssueHandlerType" minOccurs="0" />
<xs:element name="InvalidNullableReturnType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidOperand" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidOverride" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidParamDefault" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidParent" type="IssueHandlerType" minOccurs="0" />
<xs:element name="InvalidPassByReference" type="IssueHandlerType" minOccurs="0" />
Expand Down
4 changes: 2 additions & 2 deletions dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5700,10 +5700,10 @@
'ini_restore' => ['void', 'option'=>'string'],
'ini_parse_quantity' => ['int', 'shorthand'=>'non-empty-string'],
'ini_set' => ['string|false', 'option'=>'string', 'value'=>'string|int|float|bool|null'],
'inotify_add_watch' => ['int', 'inotify_instance'=>'resource', 'pathname'=>'string', 'mask'=>'int'],
'inotify_add_watch' => ['int|false', 'inotify_instance'=>'resource', 'pathname'=>'string', 'mask'=>'int'],
'inotify_init' => ['resource|false'],
'inotify_queue_len' => ['int', 'inotify_instance'=>'resource'],
'inotify_read' => ['array|false', 'inotify_instance'=>'resource'],
'inotify_read' => ['array{wd: int, mask: int, cookie: int, name: string}[]|false', 'inotify_instance'=>'resource'],
'inotify_rm_watch' => ['bool', 'inotify_instance'=>'resource', 'watch_descriptor'=>'int'],
'intdiv' => ['int', 'num1'=>'int', 'num2'=>'int'],
'interface_exists' => ['bool', 'interface'=>'string', 'autoload='=>'bool'],
Expand Down
4 changes: 2 additions & 2 deletions dictionaries/CallMap_historical.php
Original file line number Diff line number Diff line change
Expand Up @@ -11832,10 +11832,10 @@
'ini_get_all' => ['array|false', 'extension='=>'?string', 'details='=>'bool'],
'ini_restore' => ['void', 'option'=>'string'],
'ini_set' => ['string|false', 'option'=>'string', 'value'=>'string'],
'inotify_add_watch' => ['int', 'inotify_instance'=>'resource', 'pathname'=>'string', 'mask'=>'int'],
'inotify_add_watch' => ['int|false', 'inotify_instance'=>'resource', 'pathname'=>'string', 'mask'=>'int'],
'inotify_init' => ['resource|false'],
'inotify_queue_len' => ['int', 'inotify_instance'=>'resource'],
'inotify_read' => ['array|false', 'inotify_instance'=>'resource'],
'inotify_read' => ['array{wd: int, mask: int, cookie: int, name: string}[]|false', 'inotify_instance'=>'resource'],
'inotify_rm_watch' => ['bool', 'inotify_instance'=>'resource', 'watch_descriptor'=>'int'],
'intdiv' => ['int', 'num1'=>'int', 'num2'=>'int'],
'interface_exists' => ['bool', 'interface'=>'string', 'autoload='=>'bool'],
Expand Down
3 changes: 2 additions & 1 deletion dictionaries/PropertyMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
'formatOutput' => 'bool',
'implementation' => 'DOMImplementation',
'lastElementChild' => 'DOMElement|null',
'ownerDocument' => 'null',
'preserveWhiteSpace' => 'bool',
'recover' => 'bool',
'resolveExternals' => 'bool',
Expand Down Expand Up @@ -173,7 +174,7 @@
'nodeName' => 'string',
'nodeType' => 'int',
'nodeValue' => 'string|null',
'ownerDocument' => 'DOMDocument|null',
'ownerDocument' => 'DOMDocument',
'parentNode' => 'DOMNode|null',
'prefix' => 'string',
'previousSibling' => 'DOMNode|null',
Expand Down
1 change: 1 addition & 0 deletions docs/running_psalm/error_levels.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Level 5 and above allows a more non-verifiable code, and higher levels are even
- [CircularReference](issues/CircularReference.md)
- [ConflictingReferenceConstraint](issues/ConflictingReferenceConstraint.md)
- [ContinueOutsideLoop](issues/ContinueOutsideLoop.md)
- [InvalidOverride](issues/InvalidOverride.md)
- [InvalidTypeImport](issues/InvalidTypeImport.md)
- [MethodSignatureMismatch](issues/MethodSignatureMismatch.md)
- [NonVariableReferenceReturn](issues/NonVariableReferenceReturn.md)
Expand Down
1 change: 1 addition & 0 deletions docs/running_psalm/issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
- [InvalidNamedArgument](issues/InvalidNamedArgument.md)
- [InvalidNullableReturnType](issues/InvalidNullableReturnType.md)
- [InvalidOperand](issues/InvalidOperand.md)
- [InvalidOverride](issues/InvalidOverride.md)
- [InvalidParamDefault](issues/InvalidParamDefault.md)
- [InvalidParent](issues/InvalidParent.md)
- [InvalidPassByReference](issues/InvalidPassByReference.md)
Expand Down
24 changes: 24 additions & 0 deletions docs/running_psalm/issues/InvalidOverride.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# InvalidOverride

Emitted when an `Override` attribute was added to a method that does not override a method from a parent class or implemented interface.

```php
<?php

class A {
function receive(): void
{
}
}

class B extends A {
#[Override]
function recieve(): void
{
}
}
```

## Why this is bad

A fatal error will be thrown.
Loading