Skip to content

Commit

Permalink
Merge pull request #10656 from weirdan/update-master
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan authored Feb 5, 2024
2 parents d916aa6 + 49f5c99 commit 4b2c698
Show file tree
Hide file tree
Showing 31 changed files with 1,137 additions and 824 deletions.
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

0 comments on commit 4b2c698

Please sign in to comment.