Matthew Brown
Matthew Brown
https://psalm.dev/r/20e884ad18 We encounter this issue because PHP does not allow the explicit specification of generic parameters e.g. `new Collection([])` The only way to detect this would be to create a...
Please complete the information below: # Where is the problem? In the attributes section # What is the problem? The [typechecker allows arbitrary](https://github.com/facebook/hhvm/blob/a4f889e235ecb86061785f4b433494c01b696113/hphp/hack/src/naming/naming_special_names.ml#L196-L200) `data-` and `aria-` attributes, but there's no...
Please complete the information below: # Where is the problem? > 4064: Accessing members on a nullable object > Accessing a property or a method on null will throw an...
This fixes an issue where the contents of `/* ... */` comments are swallowed when they appear on the same line as the previous token. ```hack function foo(string $a): void...
Found using [this Psalm config](https://gist.github.com/muglug/5a803273270dd6309d896089859cad0a) on `vimeo/psalm:dev-master`. Mostly just docblock improvements, with a few changes: - I removed `PHP_CodeSniffer\Files\File::getSuccessCount` because it used an undefined property and seems never to have...
**Describe the bug** Originally reported by @eryi here: https://github.com/facebook/hhvm/issues/8012#issuecomment-408665965 **Standalone code, or other way to reproduce the problem** ```hack function myfunc(shape(?'a' => shape(?'b' => string)) $var): void { if (!Shapes::keyExists($var,...
On Psalm latest ``` ./psalm --clear-cache git checkout b3f6b56 ./psalm --threads=8 --diff --diff-methods --show-info=false ./psalm --threads=8 --diff --diff-methods --show-info=false git checkout 6f6e265 ./psalm --threads=8 --diff --diff-methods --show-info=false ``` Expected: No...
Found and fixed this bug in the PHP version: This query ```sql SELECT * FROM (SELECT * FROM `foo` UNION ALL SELECT * FROM `bar`) AS `baz` ``` is treated...
```php /** @param callable():void $c */ function foo(callable $c) : void {} foo(function() : string { return "hello";}); ``` Expected: No issue Actual: Parameter #1 $c of function foo expects...
**Describe the bug** We see an unexpected error in the code below. Replacing `use type Bar\{Bar};` with `use type Bar\Bar;` is a workaround for this issue. **Standalone code, or other...