Matthew Brown
Matthew Brown
**Describe the bug** We have a pattern where we want to error any time someone uses a banned method: **Standalone code, or other way to reproduce the problem** ```hack abstract...
Given this code ```hack class ATest {} class ATestChild extends ATest { public function doThing(): void {} } function foo(dict $arr) { if (HH\Lib\C\contains_key($arr, 'b') && $arr['b'] is ATestChild) {...
The current coeffects system allows you to describe a pure function by using the empty set `[]` annotation: ```hack function someFunc(int $x)[] { return $x + 1; } ``` While...
```hack abstract class C1 { final public function __construct(private T $value) {} public static function from(mixed $value): this { return new static($value); } public function getValue() : T { return...
Would it be feasible to create a separate class for array destructuring? Like `AssignmentArray_` or `ListArray_`. Using a single class to represent two totally different scenarios (even though the syntax...
Given the following ```php function bar(object $o) : void { $o->foo( $one, , ); } ``` there's no `MethodCall` node - I wonder whether it'd be possible to preserve the...
Psalm has a list of templated functions here: https://github.com/vimeo/psalm/blob/master/src/Psalm/Internal/Stubs/CoreGenericFunctions.php The big benefit of those is that they allow static analysis to figure out what's happening in a bunch of common...
Support for `typename` was added in https://github.com/facebook/hhvm/commit/3200c801865cad48e4d6c93044d8741d704059bf but never explicitly documented Additionally `classname` can be used to document a type param constraint — that's not documented either. -------------------------------- - Build...
Supposing we wanted the tool to understand PHP docblocks, would that grammar have to live in https://github.com/tree-sitter/tree-sitter-phpdoc or similar? And how could that be plugged into `tree-sitter-php`?
Doctrine uses `__call` to allow specific `findOneBy*` methods - you could use `MethodExistenceProviderInterface`, `MethodParamsProviderInterface` and `MethodReturnTypeProviderInterface` to support the functionality, I think?