From a696e559b7a76f5f81568efc87494abed599f08d Mon Sep 17 00:00:00 2001 From: Michael Stilkerich Date: Fri, 1 Apr 2022 16:13:55 +0200 Subject: [PATCH 01/22] Treat readline functions as impure --- src/Psalm/Internal/Codebase/Functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Codebase/Functions.php b/src/Psalm/Internal/Codebase/Functions.php index f8f5b16fa..ca882a0c6 100644 --- a/src/Psalm/Internal/Codebase/Functions.php +++ b/src/Psalm/Internal/Codebase/Functions.php @@ -404,7 +404,7 @@ class Functions 'opendir', 'readdir', 'closedir', 'rewinddir', 'scandir', 'fopen', 'fread', 'fwrite', 'fclose', 'touch', 'fpassthru', 'fputs', 'fscanf', 'fseek', 'flock', 'ftruncate', 'fprintf', 'symlink', 'mkdir', 'unlink', 'rename', 'rmdir', 'popen', 'pclose', - 'fgetcsv', 'fputcsv', 'umask', 'finfo_open', 'finfo_close', 'finfo_file', 'readline_add_history', + 'fgetcsv', 'fputcsv', 'umask', 'finfo_open', 'finfo_close', 'finfo_file', 'stream_set_timeout', 'fgets', 'fflush', 'move_uploaded_file', 'file_exists', 'realpath', 'glob', 'is_readable', 'is_dir', 'is_file', @@ -515,6 +515,10 @@ class Functions return false; } + if (strpos($function_id, 'readline') === 0) { + return false; + } + if (($function_id === 'var_export' || $function_id === 'print_r') && !isset($args[1])) { return false; } From e87c25c825273ffeb67563c0456586985a725e55 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sat, 2 Apr 2022 14:57:56 +0200 Subject: [PATCH 02/22] Second attempt of #7835 --- .../Expression/Fetch/InstancePropertyFetchAnalyzer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php index 35fb44b1a..8e6e3f103 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php @@ -27,6 +27,7 @@ use Psalm\Type\Atomic\TTemplateParam; use function array_merge; use function array_shift; +use function rtrim; use function strtolower; /** @@ -192,7 +193,7 @@ class InstancePropertyFetchAnalyzer ) { IssueBuffer::maybeAdd( new PossiblyNullPropertyFetch( - 'Cannot get property on possibly null variable ' . $stmt_var_id . ' of type ' . $stmt_var_type, + rtrim('Cannot get property on possibly null variable ' . $stmt_var_id) . ' of type ' . $stmt_var_type, new CodeLocation($statements_analyzer->getSource(), $stmt) ), $statements_analyzer->getSuppressedIssues() From 3729c0d3ed8ac7d1a50894cb06ec75d90e10d10f Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 2 Apr 2022 22:02:23 +0200 Subject: [PATCH 03/22] Sort types when intersection is used --- src/Psalm/Type/Atomic/TNamedObject.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Psalm/Type/Atomic/TNamedObject.php b/src/Psalm/Type/Atomic/TNamedObject.php index e9eebc946..5870103ed 100644 --- a/src/Psalm/Type/Atomic/TNamedObject.php +++ b/src/Psalm/Type/Atomic/TNamedObject.php @@ -8,7 +8,9 @@ use Psalm\Type; use Psalm\Type\Atomic; use function array_map; +use function array_merge; use function implode; +use function sort; use function strrpos; use function substr; @@ -57,7 +59,10 @@ class TNamedObject extends Atomic public function getKey(bool $include_extra = true): string { if ($include_extra && $this->extra_types) { - return $this->value . '&' . implode('&', $this->extra_types); + $types = array_merge([$this->value], $this->extra_types); + sort($types); + + return implode('&', $types); } return $this->value; @@ -66,8 +71,8 @@ class TNamedObject extends Atomic public function getId(bool $nested = false): string { if ($this->extra_types) { - return $this->value . '&' . implode( - '&', + $types = array_merge( + [$this->value], array_map( function ($type) { return $type->getId(true); @@ -75,6 +80,9 @@ class TNamedObject extends Atomic $this->extra_types ) ); + sort($types); + + return implode('&', $types); } return $this->was_static ? $this->value . '&static' : $this->value; From 590ac22ea20b98685f489fccf3412fd9204dae7d Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sun, 3 Apr 2022 09:06:35 +0200 Subject: [PATCH 04/22] Use another strategy --- .../Statements/Expression/CallAnalyzer.php | 34 +++++++++++++------ src/Psalm/Type/Atomic/TNamedObject.php | 14 ++------ 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php index b40ec32f9..7d898f9d3 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php @@ -1137,18 +1137,30 @@ class CallAnalyzer } else { foreach ($lower_bounds as $lower_bound) { if ($lower_bound->equality_bound_classlike === null) { - if (!in_array($lower_bound->type->getId(), $equality_types, true)) { - IssueBuffer::maybeAdd( - new InvalidArgument( - 'Incompatible types found for ' . $template_name . ' (' . - $lower_bound->type->getId() . ' is not in ' . - implode(', ', $equality_types) . ')', - $code_location, - $function_id - ), - $statements_analyzer->getSuppressedIssues() - ); + foreach ($bounds_with_equality as $bound_with_equality) { + if (UnionTypeComparator::isContainedBy( + $statements_analyzer->getCodebase(), + $lower_bound->type, + $bound_with_equality->type + ) && UnionTypeComparator::isContainedBy( + $statements_analyzer->getCodebase(), + $bound_with_equality->type, + $lower_bound->type + )) { + continue 2; + } } + + IssueBuffer::maybeAdd( + new InvalidArgument( + 'Incompatible types found for ' . $template_name . ' (' . + $lower_bound->type->getId() . ' is not in ' . + implode(', ', $equality_types) . ')', + $code_location, + $function_id + ), + $statements_analyzer->getSuppressedIssues() + ); } } } diff --git a/src/Psalm/Type/Atomic/TNamedObject.php b/src/Psalm/Type/Atomic/TNamedObject.php index 5870103ed..e9eebc946 100644 --- a/src/Psalm/Type/Atomic/TNamedObject.php +++ b/src/Psalm/Type/Atomic/TNamedObject.php @@ -8,9 +8,7 @@ use Psalm\Type; use Psalm\Type\Atomic; use function array_map; -use function array_merge; use function implode; -use function sort; use function strrpos; use function substr; @@ -59,10 +57,7 @@ class TNamedObject extends Atomic public function getKey(bool $include_extra = true): string { if ($include_extra && $this->extra_types) { - $types = array_merge([$this->value], $this->extra_types); - sort($types); - - return implode('&', $types); + return $this->value . '&' . implode('&', $this->extra_types); } return $this->value; @@ -71,8 +66,8 @@ class TNamedObject extends Atomic public function getId(bool $nested = false): string { if ($this->extra_types) { - $types = array_merge( - [$this->value], + return $this->value . '&' . implode( + '&', array_map( function ($type) { return $type->getId(true); @@ -80,9 +75,6 @@ class TNamedObject extends Atomic $this->extra_types ) ); - sort($types); - - return implode('&', $types); } return $this->was_static ? $this->value . '&static' : $this->value; From 587039fd1d40cc32c181f9832ba5baee0822eda6 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 3 Apr 2022 11:41:39 +0200 Subject: [PATCH 05/22] Fixing CS --- .../Expression/Fetch/InstancePropertyFetchAnalyzer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php index 8e6e3f103..1e258a05f 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php @@ -193,7 +193,8 @@ class InstancePropertyFetchAnalyzer ) { IssueBuffer::maybeAdd( new PossiblyNullPropertyFetch( - rtrim('Cannot get property on possibly null variable ' . $stmt_var_id) . ' of type ' . $stmt_var_type, + rtrim('Cannot get property on possibly null variable ' . $stmt_var_id) + . ' of type ' . $stmt_var_type, new CodeLocation($statements_analyzer->getSource(), $stmt) ), $statements_analyzer->getSuppressedIssues() From f4f1a26cf994eeeadb484477486962e01c6e8019 Mon Sep 17 00:00:00 2001 From: Jeremiasz Major Date: Thu, 7 Apr 2022 21:43:12 +0200 Subject: [PATCH 06/22] Document `@psalm-yield` --- docs/annotating_code/supported_annotations.md | 39 +++++++++++++++++++ tests/DocumentationTest.php | 1 - 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/docs/annotating_code/supported_annotations.md b/docs/annotating_code/supported_annotations.md index e1066f04d..59f73cc3e 100644 --- a/docs/annotating_code/supported_annotations.md +++ b/docs/annotating_code/supported_annotations.md @@ -553,6 +553,45 @@ Incidentally, it will change the inferred type for the following code: ``` The type of `$a` is `array` without `@no-named-arguments` but becomes `list` with it, because it exclude the case where the offset would be a string with the name of the parameter +### `@psalm-yield` + +Used to specify the type of value which will be sent back to a generator when an annotated object instance is yielded. + +```php + + */ +class Success implements Promise { + /** + * @psalm-param TValue $value + */ + public function __construct($value) {} +} + +/** + * @return Promise + */ +function fetch(): Promise { + return new Success('{"data":[]}'); +} + +function (): Generator { + $data = yield fetch(); + + // this is fine, Psalm knows that $data is a string + return json_decode($data); +}; +``` +This annotation supports only generic types, meaning that e.g. `@psalm-yield string` would be ignored. + ## Type Syntax Psalm supports PHPDoc’s [type syntax](https://docs.phpdoc.org/latest/guide/guides/types.html), and also the [proposed PHPDoc PSR type syntax](https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types). diff --git a/tests/DocumentationTest.php b/tests/DocumentationTest.php index 31c392d1a..199cd2f6f 100644 --- a/tests/DocumentationTest.php +++ b/tests/DocumentationTest.php @@ -85,7 +85,6 @@ class DocumentationTest extends TestCase '@psalm-seal-methods', '@psalm-stub-override', '@psalm-taint-unescape', - '@psalm-yield', ]; /** @var ProjectAnalyzer */ From e1fe1161bdc8f717d7495369ba3ec5a152aea2b9 Mon Sep 17 00:00:00 2001 From: Jeremiasz Major Date: Thu, 7 Apr 2022 21:44:33 +0200 Subject: [PATCH 07/22] Remove documented annotations from wall of shame --- tests/DocumentationTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/DocumentationTest.php b/tests/DocumentationTest.php index 199cd2f6f..a3dbc9336 100644 --- a/tests/DocumentationTest.php +++ b/tests/DocumentationTest.php @@ -74,7 +74,6 @@ class DocumentationTest extends TestCase */ private const WALL_OF_SHAME = [ '@psalm-assert-untainted', - '@psalm-consistent-constructor', '@psalm-flow', '@psalm-generator-return', '@psalm-ignore-variable-method', @@ -84,7 +83,6 @@ class DocumentationTest extends TestCase '@psalm-scope-this', '@psalm-seal-methods', '@psalm-stub-override', - '@psalm-taint-unescape', ]; /** @var ProjectAnalyzer */ From 23ad8d6684fb44914f50fac318a11fdd4af98912 Mon Sep 17 00:00:00 2001 From: Jeremiasz Major Date: Thu, 7 Apr 2022 21:50:19 +0200 Subject: [PATCH 08/22] Fix typos --- docs/annotating_code/supported_annotations.md | 6 +++--- docs/annotating_code/type_syntax/array_types.md | 2 +- docs/annotating_code/typing_in_psalm.md | 2 +- docs/running_psalm/language_server.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/annotating_code/supported_annotations.md b/docs/annotating_code/supported_annotations.md index 59f73cc3e..06077c3e7 100644 --- a/docs/annotating_code/supported_annotations.md +++ b/docs/annotating_code/supported_annotations.md @@ -31,7 +31,7 @@ The `@var` tag is supposed to only be used for properties. Psalm, taking a lead If `VariableReference` is provided, it should be of the form `$variable` or `$variable->property`. If used above an assignment, Psalm checks whether the `VariableReference` matches the variable being assigned. If they differ, Psalm will assign the `Type` to `VariableReference` and use it in the expression below. -If no `VariableReference` is given, the annotation tells Psalm that the right hand side of the expression, whether an assignment or a return, is of type `Type`. +If no `VariableReference` is given, the annotation tells Psalm that the right-hand side of the expression, whether an assignment or a return, is of type `Type`. ```php ` without `@no-named-arguments` but becomes `list` with it, because it exclude the case where the offset would be a string with the name of the parameter +The type of `$a` is `array` without `@no-named-arguments` but becomes `list` with it, because it excludes the case where the offset would be a string with the name of the parameter ### `@psalm-yield` diff --git a/docs/annotating_code/type_syntax/array_types.md b/docs/annotating_code/type_syntax/array_types.md index 607cfe2ec..bf2894575 100644 --- a/docs/annotating_code/type_syntax/array_types.md +++ b/docs/annotating_code/type_syntax/array_types.md @@ -27,7 +27,7 @@ Psalm has a few different ways to represent arrays in its type system: ## Generic arrays -Psalm uses a syntax [borrowed from Java](https://en.wikipedia.org/wiki/Generics_in_Java) that allows you denote the types of both keys *and* values: +Psalm uses a syntax [borrowed from Java](https://en.wikipedia.org/wiki/Generics_in_Java) that allows you to denote the types of both keys *and* values: ```php /** @return array */ ``` diff --git a/docs/annotating_code/typing_in_psalm.md b/docs/annotating_code/typing_in_psalm.md index 85e1211cc..4bb827f66 100644 --- a/docs/annotating_code/typing_in_psalm.md +++ b/docs/annotating_code/typing_in_psalm.md @@ -10,7 +10,7 @@ Psalm allows you to express a lot of complicated type information in docblocks. All docblock types are either [atomic types](type_syntax/atomic_types.md), [union types](type_syntax/union_types.md) or [intersection types](type_syntax/intersection_types.md). -Additionally Psalm supports PHPDoc’s [type syntax](https://docs.phpdoc.org/latest/guide/guides/types.html), and also the [proposed PHPDoc PSR type syntax](https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types). +Additionally, Psalm supports PHPDoc’s [type syntax](https://docs.phpdoc.org/latest/guide/guides/types.html), and also the [proposed PHPDoc PSR type syntax](https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types). ## Property declaration types vs Assignment typehints diff --git a/docs/running_psalm/language_server.md b/docs/running_psalm/language_server.md index cfeefb51d..da756e0ad 100644 --- a/docs/running_psalm/language_server.md +++ b/docs/running_psalm/language_server.md @@ -49,7 +49,7 @@ In the "Server definitions" tab you should add a definition for Psalm: - this should be an absolute path, not just `php` - Args: `vendor/bin/psalm-language-server` (on Windows use `vendor/vimeo/psalm/psalm-language-server`, or for a 'global' install '%APPDATA%' + `\Composer\vendor\vimeo\psalm\psalm-language-server`, where the '%APPDATA%' environment variable is probably something like `C:\Users\\AppData\Roaming\`) -In the "Timeouts" tab you can adjust the initialization timeout. This is important if you have a large project. You should set the "Init" value to the number of milliseconds you allow Psalm to scan your entire project and your project's dependencies. For opening a couple of projects that use large PHP frameworks, on a high end business laptop, try `240000` milliseconds for Init. +In the "Timeouts" tab you can adjust the initialization timeout. This is important if you have a large project. You should set the "Init" value to the number of milliseconds you allow Psalm to scan your entire project and your project's dependencies. For opening a couple of projects that use large PHP frameworks, on a high-end business laptop, try `240000` milliseconds for Init. ## Sublime Text From ce25b39b5dd4150dc87b996899f3566f19acfa9e Mon Sep 17 00:00:00 2001 From: Jeremiasz Major Date: Fri, 8 Apr 2022 00:30:23 +0200 Subject: [PATCH 09/22] Document `@psalm-ignore-variable-*` --- docs/annotating_code/supported_annotations.md | 25 +++++++++++++++++++ tests/DocumentationTest.php | 2 -- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/annotating_code/supported_annotations.md b/docs/annotating_code/supported_annotations.md index 06077c3e7..0337e9e7d 100644 --- a/docs/annotating_code/supported_annotations.md +++ b/docs/annotating_code/supported_annotations.md @@ -553,6 +553,31 @@ Incidentally, it will change the inferred type for the following code: ``` The type of `$a` is `array` without `@no-named-arguments` but becomes `list` with it, because it excludes the case where the offset would be a string with the name of the parameter +### `@psalm-ignore-variable-property` and `@psalm-ignore-variable-method` + +Instructs Psalm to ignore variable property fetch / variable method call when looking for dead code. +```php +class Foo +{ + // this property can be deleted by Psalter, + // as potential reference in get() is ignored + public string $bar = 'bar'; + + public function get(string $name): mixed + { + /** @psalm-ignore-variable-property */ + return $this->{$name}; + } +} +``` +When Psalm encounters variable property, it treats all properties in given class as potentially referenced. +With `@psalm-ignore-variable-property` annotation, this reference is ignored. + +While `PossiblyUnusedProperty` would be emitted in both cases, using `@psalm-ignore-variable-property` +would allow [Psalter](../manipulating_code/fixing.md) to delete `Foo::$bar`. + +`@psalm-ignore-variable-method` behaves the same way, but for variable method calls. + ### `@psalm-yield` Used to specify the type of value which will be sent back to a generator when an annotated object instance is yielded. diff --git a/tests/DocumentationTest.php b/tests/DocumentationTest.php index a3dbc9336..e55a192e6 100644 --- a/tests/DocumentationTest.php +++ b/tests/DocumentationTest.php @@ -76,8 +76,6 @@ class DocumentationTest extends TestCase '@psalm-assert-untainted', '@psalm-flow', '@psalm-generator-return', - '@psalm-ignore-variable-method', - '@psalm-ignore-variable-property', '@psalm-override-method-visibility', '@psalm-override-property-visibility', '@psalm-scope-this', From 48bc030eec9cd0da2561e7aaea63c565d24e4eec Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 9 Apr 2022 21:59:23 +0200 Subject: [PATCH 10/22] Add test --- tests/Template/ClassTemplateTest.php | 74 ++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/tests/Template/ClassTemplateTest.php b/tests/Template/ClassTemplateTest.php index 5a50e25d0..62ee25a23 100644 --- a/tests/Template/ClassTemplateTest.php +++ b/tests/Template/ClassTemplateTest.php @@ -3620,6 +3620,80 @@ class ClassTemplateTest extends TestCase foo($container->get()); ' ], + 'issue7825' => [ + ' */ + private $pager; + + /** + * @phpstan-param T $query + * @phpstan-param PagerInterface $pager + */ + public function __construct( + ProxyQueryInterface $query, + PagerInterface $pager + ) { + $this->pager = $pager; + $this->query = $query; + } + } + interface FormBuilderInterface {} + /** @template T of FieldDescriptionInterface */ + class FieldDescriptionCollection {} + interface FieldDescriptionInterface {} + abstract class Test + { + /** @var Datagrid */ + private Datagrid $datagrid; + + /** @var PagerInterface&MockObject */ + private $pager; + + /** @var ProxyQueryInterface&Stub */ + private $query; + + /** @var FieldDescriptionCollection */ + private FieldDescriptionCollection $columns; + + private FormBuilderInterface $formBuilder; + + /** + * @psalm-template RealInstanceType of object + * @psalm-param class-string $originalClassName + * @psalm-return MockObject&RealInstanceType + */ + abstract protected function createMock(string $originalClassName): MockObject; + + /** + * @psalm-template RealInstanceType of object + * @psalm-param class-string $originalClassName + * @psalm-return Stub&RealInstanceType + */ + abstract protected function createStub(string $originalClassName): Stub; + + protected function setUp(): void + { + $this->query = $this->createStub(ProxyQueryInterface::class); + $this->columns = new FieldDescriptionCollection(); + + /** @var PagerInterface&MockObject $pager */ + $pager = $this->createMock(PagerInterface::class); + $this->pager = $pager; + $this->datagrid = new Datagrid($this->query, $pager); + } + }', + ], ]; } From e7c2c77ec2206c43b45c3b97247b591498f74b75 Mon Sep 17 00:00:00 2001 From: Anton Belyaev Date: Mon, 11 Apr 2022 23:19:55 +0300 Subject: [PATCH 11/22] Disable filepath formatting as a link for Drone CI's output --- src/Psalm/Internal/CliUtils.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/CliUtils.php b/src/Psalm/Internal/CliUtils.php index 956db40e4..f8c887340 100644 --- a/src/Psalm/Internal/CliUtils.php +++ b/src/Psalm/Internal/CliUtils.php @@ -659,6 +659,7 @@ HELP; || isset($_SERVER['JENKINS_URL']) || isset($_SERVER['SCRUTINIZER']) || isset($_SERVER['GITLAB_CI']) - || isset($_SERVER['GITHUB_WORKFLOW']); + || isset($_SERVER['GITHUB_WORKFLOW']) + || isset($_SERVER['DRONE']); } } From c6d7bc0d19fa448663cdb5a811af29a7be168fc4 Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Tue, 12 Apr 2022 23:42:37 +0900 Subject: [PATCH 12/22] Improve Throwable::getTrace() return type --- dictionaries/CallMap.php | 84 ++++++++++++++--------------- dictionaries/CallMap_73_delta.php | 2 +- dictionaries/CallMap_historical.php | 82 ++++++++++++++-------------- stubs/CoreImmutableClasses.phpstub | 6 +-- 4 files changed, 87 insertions(+), 87 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 457af5a87..16686e5a5 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -346,7 +346,7 @@ return [ 'ArgumentCountError::getLine' => ['int'], 'ArgumentCountError::getMessage' => ['string'], 'ArgumentCountError::getPrevious' => ['?Throwable'], -'ArgumentCountError::getTrace' => ['list\',args?:array}>'], +'ArgumentCountError::getTrace' => ['list\',args?:array}>'], 'ArgumentCountError::getTraceAsString' => ['string'], 'ArithmeticError::__clone' => ['void'], 'ArithmeticError::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?Error'], @@ -357,7 +357,7 @@ return [ 'ArithmeticError::getLine' => ['int'], 'ArithmeticError::getMessage' => ['string'], 'ArithmeticError::getPrevious' => ['?Throwable'], -'ArithmeticError::getTrace' => ['list\',args?:array}>'], +'ArithmeticError::getTrace' => ['list\',args?:array}>'], 'ArithmeticError::getTraceAsString' => ['string'], 'array_change_key_case' => ['associative-array', 'array'=>'array', 'case='=>'int'], 'array_chunk' => ['list', 'array'=>'array', 'length'=>'int', 'preserve_keys='=>'bool'], @@ -499,7 +499,7 @@ return [ 'BadFunctionCallException::getLine' => ['int'], 'BadFunctionCallException::getMessage' => ['string'], 'BadFunctionCallException::getPrevious' => ['?Throwable|?BadFunctionCallException'], -'BadFunctionCallException::getTrace' => ['list\',args?:array}>'], +'BadFunctionCallException::getTrace' => ['list\',args?:array}>'], 'BadFunctionCallException::getTraceAsString' => ['string'], 'BadMethodCallException::__clone' => ['void'], 'BadMethodCallException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?BadMethodCallException'], @@ -509,7 +509,7 @@ return [ 'BadMethodCallException::getLine' => ['int'], 'BadMethodCallException::getMessage' => ['string'], 'BadMethodCallException::getPrevious' => ['?Throwable|?BadMethodCallException'], -'BadMethodCallException::getTrace' => ['list\',args?:array}>'], +'BadMethodCallException::getTrace' => ['list\',args?:array}>'], 'BadMethodCallException::getTraceAsString' => ['string'], 'base64_decode' => ['string|false', 'string'=>'string', 'strict='=>'bool'], 'base64_encode' => ['string', 'string'=>'string'], @@ -1073,7 +1073,7 @@ return [ 'ClosedGeneratorException::getLine' => ['int'], 'ClosedGeneratorException::getMessage' => ['string'], 'ClosedGeneratorException::getPrevious' => ['Throwable|ClosedGeneratorException|null'], -'ClosedGeneratorException::getTrace' => ['list\',args?:array}>'], +'ClosedGeneratorException::getTrace' => ['list\',args?:array}>'], 'ClosedGeneratorException::getTraceAsString' => ['string'], 'closedir' => ['void', 'dir_handle='=>'resource'], 'closelog' => ['bool'], @@ -2065,7 +2065,7 @@ return [ 'DomainException::getLine' => ['int'], 'DomainException::getMessage' => ['string'], 'DomainException::getPrevious' => ['Throwable|DomainException|null'], -'DomainException::getTrace' => ['list\',args?:array}>'], +'DomainException::getTrace' => ['list\',args?:array}>'], 'DomainException::getTraceAsString' => ['string'], 'DOMAttr::__construct' => ['void', 'name'=>'string', 'value='=>'string'], 'DOMAttr::getLineNo' => ['int'], @@ -2528,7 +2528,7 @@ return [ 'Error::getLine' => ['int'], 'Error::getMessage' => ['string'], 'Error::getPrevious' => ['Throwable|Error|null'], -'Error::getTrace' => ['list\',args?:array}>'], +'Error::getTrace' => ['list\',args?:array}>'], 'Error::getTraceAsString' => ['string'], 'error_clear_last' => ['void'], 'error_get_last' => ['?array{type:int,message:string,file:string,line:int}'], @@ -2543,7 +2543,7 @@ return [ 'ErrorException::getMessage' => ['string'], 'ErrorException::getPrevious' => ['Throwable|ErrorException|null'], 'ErrorException::getSeverity' => ['int'], -'ErrorException::getTrace' => ['list\',args?:array}>'], +'ErrorException::getTrace' => ['list\',args?:array}>'], 'ErrorException::getTraceAsString' => ['string'], 'escapeshellarg' => ['string', 'arg'=>'string'], 'escapeshellcmd' => ['string', 'command'=>'string'], @@ -2911,7 +2911,7 @@ return [ 'Exception::getLine' => ['int'], 'Exception::getMessage' => ['string'], 'Exception::getPrevious' => ['?Throwable|?Exception'], -'Exception::getTrace' => ['list\',args?:array}>'], +'Exception::getTrace' => ['list\',args?:array}>'], 'Exception::getTraceAsString' => ['string'], 'exec' => ['string|false', 'command'=>'string', '&w_output='=>'array', '&w_result_code='=>'int'], 'exif_imagetype' => ['int|false', 'filename'=>'string'], @@ -6388,7 +6388,7 @@ return [ 'IntlException::getLine' => ['int'], 'IntlException::getMessage' => ['string'], 'IntlException::getPrevious' => ['?Throwable'], -'IntlException::getTrace' => ['list\',args?:array}>'], +'IntlException::getTrace' => ['list\',args?:array}>'], 'IntlException::getTraceAsString' => ['string'], 'intlgregcal_create_instance' => ['IntlGregorianCalendar', 'timezoneOrYear='=>'mixed', 'localeOrMonth='=>'string'], 'intlgregcal_get_gregorian_change' => ['float', 'calendar'=>'IntlGregorianCalendar'], @@ -6528,7 +6528,7 @@ return [ 'InvalidArgumentException::getLine' => ['int'], 'InvalidArgumentException::getMessage' => ['string'], 'InvalidArgumentException::getPrevious' => ['Throwable|InvalidArgumentException|null'], -'InvalidArgumentException::getTrace' => ['list\',args?:array}>'], +'InvalidArgumentException::getTrace' => ['list\',args?:array}>'], 'InvalidArgumentException::getTraceAsString' => ['string'], 'ip2long' => ['int|false', 'ip'=>'string'], 'iptcembed' => ['string|bool', 'iptc_data'=>'string', 'filename'=>'string', 'spool='=>'int'], @@ -6614,7 +6614,7 @@ return [ 'JsonException::getLine' => ['int'], 'JsonException::getMessage' => ['string'], 'JsonException::getPrevious' => ['?Throwable'], -'JsonException::getTrace' => ['list\',args?:array}>'], +'JsonException::getTrace' => ['list\',args?:array}>'], 'JsonException::getTraceAsString' => ['string'], 'JsonIncrementalParser::__construct' => ['void', 'depth'=>'', 'options'=>''], 'JsonIncrementalParser::get' => ['', 'options'=>''], @@ -6842,7 +6842,7 @@ return [ 'LengthException::getLine' => ['int'], 'LengthException::getMessage' => ['string'], 'LengthException::getPrevious' => ['Throwable|LengthException|null'], -'LengthException::getTrace' => ['list\',args?:array}>'], +'LengthException::getTrace' => ['list\',args?:array}>'], 'LengthException::getTraceAsString' => ['string'], 'LevelDB::__construct' => ['void', 'name'=>'string', 'options='=>'array', 'read_options='=>'array', 'write_options='=>'array'], 'LevelDB::close' => [''], @@ -6954,7 +6954,7 @@ return [ 'LogicException::getLine' => ['int'], 'LogicException::getMessage' => ['string'], 'LogicException::getPrevious' => ['Throwable|LogicException|null'], -'LogicException::getTrace' => ['list\',args?:array}>'], +'LogicException::getTrace' => ['list\',args?:array}>'], 'LogicException::getTraceAsString' => ['string'], 'long2ip' => ['string', 'ip'=>'string|int'], 'lstat' => ['array|false', 'filename'=>'string'], @@ -7665,7 +7665,7 @@ return [ 'MongoCursorException::getLine' => ['int'], 'MongoCursorException::getMessage' => ['string'], 'MongoCursorException::getPrevious' => ['Exception|Throwable'], -'MongoCursorException::getTrace' => ['list\',args?:array}>'], +'MongoCursorException::getTrace' => ['list\',args?:array}>'], 'MongoCursorException::getTraceAsString' => ['string'], 'MongoCursorInterface::__construct' => ['void'], 'MongoCursorInterface::batchSize' => ['MongoCursorInterface', 'batchSize'=>'int'], @@ -7833,7 +7833,7 @@ return [ 'MongoDB\Driver\Exception\RuntimeException::getLine' => ['int'], 'MongoDB\Driver\Exception\RuntimeException::getMessage' => ['string'], 'MongoDB\Driver\Exception\RuntimeException::getPrevious' => ['RuntimeException|Throwable'], -'MongoDB\Driver\Exception\RuntimeException::getTrace' => ['list\',args?:array}>'], +'MongoDB\Driver\Exception\RuntimeException::getTrace' => ['list\',args?:array}>'], 'MongoDB\Driver\Exception\RuntimeException::getTraceAsString' => ['string'], 'mongodb\driver\exception\runtimeexception::hasErrorLabel' => ['bool', 'errorLabel'=>'string'], 'MongoDB\Driver\Exception\WriteException::__clone' => ['void'], @@ -7845,7 +7845,7 @@ return [ 'MongoDB\Driver\Exception\WriteException::getLine' => ['int'], 'MongoDB\Driver\Exception\WriteException::getMessage' => ['string'], 'MongoDB\Driver\Exception\WriteException::getPrevious' => ['RuntimeException|Throwable'], -'MongoDB\Driver\Exception\WriteException::getTrace' => ['list\',args?:array}>'], +'MongoDB\Driver\Exception\WriteException::getTrace' => ['list\',args?:array}>'], 'MongoDB\Driver\Exception\WriteException::getTraceAsString' => ['string'], 'MongoDB\Driver\Exception\WriteException::getWriteResult' => ['MongoDB\Driver\WriteResult'], 'MongoDB\Driver\Manager::__construct' => ['void', 'uri'=>'string', 'options='=>'array', 'driverOptions='=>'array'], @@ -7975,7 +7975,7 @@ return [ 'MongoException::getLine' => ['int'], 'MongoException::getMessage' => ['string'], 'MongoException::getPrevious' => ['Exception|Throwable'], -'MongoException::getTrace' => ['list\',args?:array}>'], +'MongoException::getTrace' => ['list\',args?:array}>'], 'MongoException::getTraceAsString' => ['string'], 'MongoGridFS::__construct' => ['void', 'db'=>'MongoDB', 'prefix='=>'string', 'chunks='=>'mixed'], 'MongoGridFS::__get' => ['MongoCollection', 'name'=>'string'], @@ -8086,7 +8086,7 @@ return [ 'MongoResultException::getLine' => ['int'], 'MongoResultException::getMessage' => ['string'], 'MongoResultException::getPrevious' => ['Exception|Throwable'], -'MongoResultException::getTrace' => ['list\',args?:array}>'], +'MongoResultException::getTrace' => ['list\',args?:array}>'], 'MongoResultException::getTraceAsString' => ['string'], 'MongoTimestamp::__construct' => ['void', 'second='=>'int', 'inc='=>'int'], 'MongoTimestamp::__toString' => ['string'], @@ -8106,7 +8106,7 @@ return [ 'MongoWriteConcernException::getLine' => ['int'], 'MongoWriteConcernException::getMessage' => ['string'], 'MongoWriteConcernException::getPrevious' => ['Exception|Throwable'], -'MongoWriteConcernException::getTrace' => ['list\',args?:array}>'], +'MongoWriteConcernException::getTrace' => ['list\',args?:array}>'], 'MongoWriteConcernException::getTraceAsString' => ['string'], 'monitor_custom_event' => ['void', 'class'=>'string', 'text'=>'string', 'severe='=>'int', 'user_data='=>'mixed'], 'monitor_httperror_event' => ['void', 'error_code'=>'int', 'url'=>'string', 'severe='=>'int'], @@ -9384,7 +9384,7 @@ return [ 'OutOfBoundsException::getLine' => ['int'], 'OutOfBoundsException::getMessage' => ['string'], 'OutOfBoundsException::getPrevious' => ['Throwable|OutOfBoundsException|null'], -'OutOfBoundsException::getTrace' => ['list\',args?:array}>'], +'OutOfBoundsException::getTrace' => ['list\',args?:array}>'], 'OutOfBoundsException::getTraceAsString' => ['string'], 'OutOfRangeException::__clone' => ['void'], 'OutOfRangeException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?OutOfRangeException'], @@ -9394,7 +9394,7 @@ return [ 'OutOfRangeException::getLine' => ['int'], 'OutOfRangeException::getMessage' => ['string'], 'OutOfRangeException::getPrevious' => ['Throwable|OutOfRangeException|null'], -'OutOfRangeException::getTrace' => ['list\',args?:array}>'], +'OutOfRangeException::getTrace' => ['list\',args?:array}>'], 'OutOfRangeException::getTraceAsString' => ['string'], 'output_add_rewrite_var' => ['bool', 'name'=>'string', 'value'=>'string'], 'output_cache_disable' => ['void'], @@ -9421,7 +9421,7 @@ return [ 'OverflowException::getLine' => ['int'], 'OverflowException::getMessage' => ['string'], 'OverflowException::getPrevious' => ['Throwable|OverflowException|null'], -'OverflowException::getTrace' => ['list\',args?:array}>'], +'OverflowException::getTrace' => ['list\',args?:array}>'], 'OverflowException::getTraceAsString' => ['string'], 'overload' => ['', 'class_name'=>'string'], 'override_function' => ['bool', 'function_name'=>'string', 'function_args'=>'string', 'function_code'=>'string'], @@ -9513,7 +9513,7 @@ return [ 'ParseError::getLine' => ['int'], 'ParseError::getMessage' => ['string'], 'ParseError::getPrevious' => ['Throwable|ParseError|null'], -'ParseError::getTrace' => ['list\',args?:array}>'], +'ParseError::getTrace' => ['list\',args?:array}>'], 'ParseError::getTraceAsString' => ['string'], 'parsekit_compile_file' => ['array', 'filename'=>'string', 'errors='=>'array', 'options='=>'int'], 'parsekit_compile_string' => ['array', 'phpcode'=>'string', 'errors='=>'array', 'options='=>'int'], @@ -9897,7 +9897,7 @@ return [ 'PDOException::getLine' => ['int'], 'PDOException::getMessage' => ['string'], 'PDOException::getPrevious' => ['?Throwable'], -'PDOException::getTrace' => ['list\',args?:array}>'], +'PDOException::getTrace' => ['list\',args?:array}>'], 'PDOException::getTraceAsString' => ['string'], 'PDOStatement::__sleep' => ['list'], 'PDOStatement::__wakeup' => ['void'], @@ -10516,7 +10516,7 @@ return [ 'RangeException::getLine' => ['int'], 'RangeException::getMessage' => ['string'], 'RangeException::getPrevious' => ['Throwable|RangeException|null'], -'RangeException::getTrace' => ['list\',args?:array}>'], +'RangeException::getTrace' => ['list\',args?:array}>'], 'RangeException::getTraceAsString' => ['string'], 'rar_allow_broken_set' => ['bool', 'rarfile'=>'RarArchive', 'allow_broken'=>'bool'], 'rar_broken_is' => ['bool', 'rarfile'=>'rararchive'], @@ -10555,7 +10555,7 @@ return [ 'RarException::getLine' => ['int'], 'RarException::getMessage' => ['string'], 'RarException::getPrevious' => ['Exception|Throwable'], -'RarException::getTrace' => ['list\',args?:array}>'], +'RarException::getTrace' => ['list\',args?:array}>'], 'RarException::getTraceAsString' => ['string'], 'RarException::isUsingExceptions' => ['bool'], 'RarException::setUsingExceptions' => ['RarEntry', 'using_exceptions'=>'bool'], @@ -11761,7 +11761,7 @@ return [ 'RuntimeException::getLine' => ['int'], 'RuntimeException::getMessage' => ['string'], 'RuntimeException::getPrevious' => ['Throwable|RuntimeException|null'], -'RuntimeException::getTrace' => ['list\',args?:array}>'], +'RuntimeException::getTrace' => ['list\',args?:array}>'], 'RuntimeException::getTraceAsString' => ['string'], 'SAMConnection::commit' => ['bool'], 'SAMConnection::connect' => ['bool', 'protocol'=>'string', 'properties='=>'array'], @@ -12263,7 +12263,7 @@ return [ 'SoapFault::getLine' => ['int'], 'SoapFault::getMessage' => ['string'], 'SoapFault::getPrevious' => ['?Exception|?Throwable'], -'SoapFault::getTrace' => ['list\',args?:array}>'], +'SoapFault::getTrace' => ['list\',args?:array}>'], 'SoapFault::getTraceAsString' => ['string'], 'SoapFault::SoapFault' => ['object', 'faultcode'=>'string', 'faultstring'=>'string', 'faultactor='=>'?string', 'detail='=>'?mixed', 'faultname='=>'?string', 'headerfault='=>'?mixed'], 'SoapHeader::__construct' => ['void', 'namespace'=>'string', 'name'=>'string', 'data='=>'mixed', 'mustunderstand='=>'bool', 'actor='=>'string'], @@ -12443,7 +12443,7 @@ return [ 'SolrClientException::getLine' => ['int'], 'SolrClientException::getMessage' => ['string'], 'SolrClientException::getPrevious' => ['?Exception|?Throwable'], -'SolrClientException::getTrace' => ['list\',args?:array}>'], +'SolrClientException::getTrace' => ['list\',args?:array}>'], 'SolrClientException::getTraceAsString' => ['string'], 'SolrCollapseFunction::__construct' => ['void', 'field'=>'string'], 'SolrCollapseFunction::__toString' => ['string'], @@ -12735,7 +12735,7 @@ return [ 'SolrException::getLine' => ['int'], 'SolrException::getMessage' => ['string'], 'SolrException::getPrevious' => ['Exception|Throwable'], -'SolrException::getTrace' => ['list\',args?:array}>'], +'SolrException::getTrace' => ['list\',args?:array}>'], 'SolrException::getTraceAsString' => ['string'], 'SolrGenericResponse::__construct' => ['void'], 'SolrGenericResponse::__destruct' => ['void'], @@ -12760,7 +12760,7 @@ return [ 'SolrIllegalArgumentException::getLine' => ['int'], 'SolrIllegalArgumentException::getMessage' => ['string'], 'SolrIllegalArgumentException::getPrevious' => ['Exception|Throwable'], -'SolrIllegalArgumentException::getTrace' => ['list\',args?:array}>'], +'SolrIllegalArgumentException::getTrace' => ['list\',args?:array}>'], 'SolrIllegalArgumentException::getTraceAsString' => ['string'], 'SolrIllegalOperationException::__clone' => ['void'], 'SolrIllegalOperationException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Exception|?Throwable'], @@ -12772,7 +12772,7 @@ return [ 'SolrIllegalOperationException::getLine' => ['int'], 'SolrIllegalOperationException::getMessage' => ['string'], 'SolrIllegalOperationException::getPrevious' => ['Exception|Throwable'], -'SolrIllegalOperationException::getTrace' => ['list\',args?:array}>'], +'SolrIllegalOperationException::getTrace' => ['list\',args?:array}>'], 'SolrIllegalOperationException::getTraceAsString' => ['string'], 'SolrInputDocument::__clone' => ['void'], 'SolrInputDocument::__construct' => ['void'], @@ -13080,7 +13080,7 @@ return [ 'SolrServerException::getLine' => ['int'], 'SolrServerException::getMessage' => ['string'], 'SolrServerException::getPrevious' => ['Exception|Throwable'], -'SolrServerException::getTrace' => ['list\',args?:array}>'], +'SolrServerException::getTrace' => ['list\',args?:array}>'], 'SolrServerException::getTraceAsString' => ['string'], 'SolrUpdateResponse::__construct' => ['void'], 'SolrUpdateResponse::__destruct' => ['void'], @@ -13561,7 +13561,7 @@ return [ 'SQLiteException::getLine' => ['int'], 'SQLiteException::getMessage' => ['string'], 'SQLiteException::getPrevious' => ['RuntimeException|Throwable|null'], -'SQLiteException::getTrace' => ['list\',args?:array}>'], +'SQLiteException::getTrace' => ['list\',args?:array}>'], 'SQLiteException::getTraceAsString' => ['string'], 'SQLiteResult::__construct' => ['void'], 'SQLiteResult::column' => ['mixed', 'index_or_name'=>'', 'decode_binary='=>'bool'], @@ -14560,7 +14560,7 @@ return [ 'Throwable::getLine' => ['int'], 'Throwable::getMessage' => ['string'], 'Throwable::getPrevious' => ['?Throwable'], -'Throwable::getTrace' => ['list\',args?:array}>'], +'Throwable::getTrace' => ['list\',args?:array}>'], 'Throwable::getTraceAsString' => ['string'], 'tidy::__construct' => ['void', 'filename='=>'string', 'config='=>'', 'encoding='=>'string', 'useIncludePath='=>'bool'], 'tidy::body' => ['tidyNode'], @@ -14880,7 +14880,7 @@ return [ 'TypeError::getLine' => ['int'], 'TypeError::getMessage' => ['string'], 'TypeError::getPrevious' => ['Throwable|TypeError|null'], -'TypeError::getTrace' => ['list\',args?:array}>'], +'TypeError::getTrace' => ['list\',args?:array}>'], 'TypeError::getTraceAsString' => ['string'], 'uasort' => ['bool', '&rw_array'=>'array', 'callback'=>'callable(mixed,mixed):int'], 'ucfirst' => ['string', 'string'=>'string'], @@ -15103,7 +15103,7 @@ return [ 'UnderflowException::getLine' => ['int'], 'UnderflowException::getMessage' => ['string'], 'UnderflowException::getPrevious' => ['Throwable|UnderflowException|null'], -'UnderflowException::getTrace' => ['list\',args?:array}>'], +'UnderflowException::getTrace' => ['list\',args?:array}>'], 'UnderflowException::getTraceAsString' => ['string'], 'UnexpectedValueException::__clone' => ['void'], 'UnexpectedValueException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?UnexpectedValueException'], @@ -15113,7 +15113,7 @@ return [ 'UnexpectedValueException::getLine' => ['int'], 'UnexpectedValueException::getMessage' => ['string'], 'UnexpectedValueException::getPrevious' => ['Throwable|UnexpectedValueException|null'], -'UnexpectedValueException::getTrace' => ['list\',args?:array}>'], +'UnexpectedValueException::getTrace' => ['list\',args?:array}>'], 'UnexpectedValueException::getTraceAsString' => ['string'], 'uniqid' => ['non-empty-string', 'prefix='=>'string', 'more_entropy='=>'bool'], 'unixtojd' => ['int', 'timestamp='=>'int'], @@ -15206,7 +15206,7 @@ return [ 'V8JsScriptException::getLine' => ['int'], 'V8JsScriptException::getMessage' => ['string'], 'V8JsScriptException::getPrevious' => ['Exception|Throwable'], -'V8JsScriptException::getTrace' => ['list\',args?:array}>'], +'V8JsScriptException::getTrace' => ['list\',args?:array}>'], 'V8JsScriptException::getTraceAsString' => ['string'], 'var_dump' => ['void', 'value'=>'mixed', '...values='=>'mixed'], 'var_export' => ['?string', 'value'=>'mixed', 'return='=>'bool'], @@ -16556,7 +16556,7 @@ return [ 'Yar_Client_Exception::getLine' => ['int'], 'Yar_Client_Exception::getMessage' => ['string'], 'Yar_Client_Exception::getPrevious' => ['?Exception|?Throwable'], -'Yar_Client_Exception::getTrace' => ['list\',args?:array}>'], +'Yar_Client_Exception::getTrace' => ['list\',args?:array}>'], 'Yar_Client_Exception::getTraceAsString' => ['string'], 'Yar_Client_Exception::getType' => ['string'], 'Yar_Concurrent_Client::call' => ['int', 'uri'=>'string', 'method'=>'string', 'parameters'=>'array', 'callback='=>'callable'], @@ -16573,7 +16573,7 @@ return [ 'Yar_Server_Exception::getLine' => ['int'], 'Yar_Server_Exception::getMessage' => ['string'], 'Yar_Server_Exception::getPrevious' => ['?Exception|?Throwable'], -'Yar_Server_Exception::getTrace' => ['list\',args?:array}>'], +'Yar_Server_Exception::getTrace' => ['list\',args?:array}>'], 'Yar_Server_Exception::getTraceAsString' => ['string'], 'Yar_Server_Exception::getType' => ['string'], 'yaz_addinfo' => ['string', 'id'=>'resource'], diff --git a/dictionaries/CallMap_73_delta.php b/dictionaries/CallMap_73_delta.php index 706a16bd7..c54758bbc 100644 --- a/dictionaries/CallMap_73_delta.php +++ b/dictionaries/CallMap_73_delta.php @@ -26,7 +26,7 @@ return [ 'JsonException::getLine' => ['int'], 'JsonException::getMessage' => ['string'], 'JsonException::getPrevious' => ['?Throwable'], - 'JsonException::getTrace' => ['list\',args?:array}>'], + 'JsonException::getTrace' => ['list\',args?:array}>'], 'JsonException::getTraceAsString' => ['string'], 'SplPriorityQueue::isCorrupted' => ['bool'], 'array_key_first' => ['int|string|null', 'array'=>'array'], diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index 1755a6b66..9c119453b 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -196,7 +196,7 @@ return [ 'ArgumentCountError::getLine' => ['int'], 'ArgumentCountError::getMessage' => ['string'], 'ArgumentCountError::getPrevious' => ['?Throwable'], - 'ArgumentCountError::getTrace' => ['list\',args?:array}>'], + 'ArgumentCountError::getTrace' => ['list\',args?:array}>'], 'ArgumentCountError::getTraceAsString' => ['string'], 'ArithmeticError::__clone' => ['void'], 'ArithmeticError::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?Error'], @@ -207,7 +207,7 @@ return [ 'ArithmeticError::getLine' => ['int'], 'ArithmeticError::getMessage' => ['string'], 'ArithmeticError::getPrevious' => ['?Throwable'], - 'ArithmeticError::getTrace' => ['list\',args?:array}>'], + 'ArithmeticError::getTrace' => ['list\',args?:array}>'], 'ArithmeticError::getTraceAsString' => ['string'], 'ArrayAccess::offsetExists' => ['bool', 'offset'=>'mixed'], 'ArrayAccess::offsetGet' => ['mixed', 'offset'=>'mixed'], @@ -267,7 +267,7 @@ return [ 'BadFunctionCallException::getLine' => ['int'], 'BadFunctionCallException::getMessage' => ['string'], 'BadFunctionCallException::getPrevious' => ['?Throwable|?BadFunctionCallException'], - 'BadFunctionCallException::getTrace' => ['list\',args?:array}>'], + 'BadFunctionCallException::getTrace' => ['list\',args?:array}>'], 'BadFunctionCallException::getTraceAsString' => ['string'], 'BadMethodCallException::__clone' => ['void'], 'BadMethodCallException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?BadMethodCallException'], @@ -277,7 +277,7 @@ return [ 'BadMethodCallException::getLine' => ['int'], 'BadMethodCallException::getMessage' => ['string'], 'BadMethodCallException::getPrevious' => ['?Throwable|?BadMethodCallException'], - 'BadMethodCallException::getTrace' => ['list\',args?:array}>'], + 'BadMethodCallException::getTrace' => ['list\',args?:array}>'], 'BadMethodCallException::getTraceAsString' => ['string'], 'COM::__call' => ['', 'name'=>'', 'args'=>''], 'COM::__construct' => ['void', 'module_name'=>'string', 'server_name='=>'mixed', 'codepage='=>'int', 'typelib='=>'string'], @@ -536,7 +536,7 @@ return [ 'ClosedGeneratorException::getLine' => ['int'], 'ClosedGeneratorException::getMessage' => ['string'], 'ClosedGeneratorException::getPrevious' => ['Throwable|ClosedGeneratorException|null'], - 'ClosedGeneratorException::getTrace' => ['list\',args?:array}>'], + 'ClosedGeneratorException::getTrace' => ['list\',args?:array}>'], 'ClosedGeneratorException::getTraceAsString' => ['string'], 'Closure::__construct' => ['void'], 'Closure::__invoke' => ['', '...args='=>''], @@ -1154,7 +1154,7 @@ return [ 'DomainException::getLine' => ['int'], 'DomainException::getMessage' => ['string'], 'DomainException::getPrevious' => ['Throwable|DomainException|null'], - 'DomainException::getTrace' => ['list\',args?:array}>'], + 'DomainException::getTrace' => ['list\',args?:array}>'], 'DomainException::getTraceAsString' => ['string'], 'Ds\Collection::clear' => ['void'], 'Ds\Collection::copy' => ['Ds\Collection'], @@ -1379,7 +1379,7 @@ return [ 'Error::getLine' => ['int'], 'Error::getMessage' => ['string'], 'Error::getPrevious' => ['Throwable|Error|null'], - 'Error::getTrace' => ['list\',args?:array}>'], + 'Error::getTrace' => ['list\',args?:array}>'], 'Error::getTraceAsString' => ['string'], 'ErrorException::__clone' => ['void'], 'ErrorException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'severity='=>'int', 'filename='=>'string', 'line='=>'int', 'previous='=>'?Throwable|?ErrorException'], @@ -1390,7 +1390,7 @@ return [ 'ErrorException::getMessage' => ['string'], 'ErrorException::getPrevious' => ['Throwable|ErrorException|null'], 'ErrorException::getSeverity' => ['int'], - 'ErrorException::getTrace' => ['list\',args?:array}>'], + 'ErrorException::getTrace' => ['list\',args?:array}>'], 'ErrorException::getTraceAsString' => ['string'], 'Ev::backend' => ['int'], 'Ev::depth' => ['int'], @@ -1724,7 +1724,7 @@ return [ 'Exception::getLine' => ['int'], 'Exception::getMessage' => ['string'], 'Exception::getPrevious' => ['?Throwable|?Exception'], - 'Exception::getTrace' => ['list\',args?:array}>'], + 'Exception::getTrace' => ['list\',args?:array}>'], 'Exception::getTraceAsString' => ['string'], 'FANNConnection::__construct' => ['void', 'from_neuron'=>'int', 'to_neuron'=>'int', 'weight'=>'float'], 'FANNConnection::getFromNeuron' => ['int'], @@ -3388,7 +3388,7 @@ return [ 'IntlException::getLine' => ['int'], 'IntlException::getMessage' => ['string'], 'IntlException::getPrevious' => ['?Throwable'], - 'IntlException::getTrace' => ['list\',args?:array}>'], + 'IntlException::getTrace' => ['list\',args?:array}>'], 'IntlException::getTraceAsString' => ['string'], 'IntlGregorianCalendar::__construct' => ['void'], 'IntlGregorianCalendar::add' => ['bool', 'field'=>'int', 'amount'=>'int'], @@ -3504,7 +3504,7 @@ return [ 'InvalidArgumentException::getLine' => ['int'], 'InvalidArgumentException::getMessage' => ['string'], 'InvalidArgumentException::getPrevious' => ['Throwable|InvalidArgumentException|null'], - 'InvalidArgumentException::getTrace' => ['list\',args?:array}>'], + 'InvalidArgumentException::getTrace' => ['list\',args?:array}>'], 'InvalidArgumentException::getTraceAsString' => ['string'], 'Iterator::current' => ['mixed'], 'Iterator::key' => ['mixed'], @@ -3600,7 +3600,7 @@ return [ 'LengthException::getLine' => ['int'], 'LengthException::getMessage' => ['string'], 'LengthException::getPrevious' => ['Throwable|LengthException|null'], - 'LengthException::getTrace' => ['list\',args?:array}>'], + 'LengthException::getTrace' => ['list\',args?:array}>'], 'LengthException::getTraceAsString' => ['string'], 'LevelDB::__construct' => ['void', 'name'=>'string', 'options='=>'array', 'read_options='=>'array', 'write_options='=>'array'], 'LevelDB::close' => [''], @@ -3669,7 +3669,7 @@ return [ 'LogicException::getLine' => ['int'], 'LogicException::getMessage' => ['string'], 'LogicException::getPrevious' => ['Throwable|LogicException|null'], - 'LogicException::getTrace' => ['list\',args?:array}>'], + 'LogicException::getTrace' => ['list\',args?:array}>'], 'LogicException::getTraceAsString' => ['string'], 'Lua::__call' => ['mixed', 'lua_func'=>'callable', 'args='=>'array', 'use_self='=>'int'], 'Lua::__construct' => ['void', 'lua_script_file'=>'string'], @@ -3936,7 +3936,7 @@ return [ 'MongoCursorException::getLine' => ['int'], 'MongoCursorException::getMessage' => ['string'], 'MongoCursorException::getPrevious' => ['Exception|Throwable'], - 'MongoCursorException::getTrace' => ['list\',args?:array}>'], + 'MongoCursorException::getTrace' => ['list\',args?:array}>'], 'MongoCursorException::getTraceAsString' => ['string'], 'MongoCursorInterface::__construct' => ['void'], 'MongoCursorInterface::batchSize' => ['MongoCursorInterface', 'batchSize'=>'int'], @@ -4103,7 +4103,7 @@ return [ 'MongoDB\Driver\Exception\RuntimeException::getLine' => ['int'], 'MongoDB\Driver\Exception\RuntimeException::getMessage' => ['string'], 'MongoDB\Driver\Exception\RuntimeException::getPrevious' => ['RuntimeException|Throwable'], - 'MongoDB\Driver\Exception\RuntimeException::getTrace' => ['list\',args?:array}>'], + 'MongoDB\Driver\Exception\RuntimeException::getTrace' => ['list\',args?:array}>'], 'MongoDB\Driver\Exception\RuntimeException::getTraceAsString' => ['string'], 'MongoDB\Driver\Exception\WriteException::__clone' => ['void'], 'MongoDB\Driver\Exception\WriteException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?RuntimeException|?Throwable'], @@ -4114,7 +4114,7 @@ return [ 'MongoDB\Driver\Exception\WriteException::getLine' => ['int'], 'MongoDB\Driver\Exception\WriteException::getMessage' => ['string'], 'MongoDB\Driver\Exception\WriteException::getPrevious' => ['RuntimeException|Throwable'], - 'MongoDB\Driver\Exception\WriteException::getTrace' => ['list\',args?:array}>'], + 'MongoDB\Driver\Exception\WriteException::getTrace' => ['list\',args?:array}>'], 'MongoDB\Driver\Exception\WriteException::getTraceAsString' => ['string'], 'MongoDB\Driver\Exception\WriteException::getWriteResult' => ['MongoDB\Driver\WriteResult'], 'MongoDB\Driver\Manager::__construct' => ['void', 'uri'=>'string', 'options='=>'array', 'driverOptions='=>'array'], @@ -4203,7 +4203,7 @@ return [ 'MongoException::getLine' => ['int'], 'MongoException::getMessage' => ['string'], 'MongoException::getPrevious' => ['Exception|Throwable'], - 'MongoException::getTrace' => ['list\',args?:array}>'], + 'MongoException::getTrace' => ['list\',args?:array}>'], 'MongoException::getTraceAsString' => ['string'], 'MongoGridFS::__construct' => ['void', 'db'=>'MongoDB', 'prefix='=>'string', 'chunks='=>'mixed'], 'MongoGridFS::__get' => ['MongoCollection', 'name'=>'string'], @@ -4314,7 +4314,7 @@ return [ 'MongoResultException::getLine' => ['int'], 'MongoResultException::getMessage' => ['string'], 'MongoResultException::getPrevious' => ['Exception|Throwable'], - 'MongoResultException::getTrace' => ['list\',args?:array}>'], + 'MongoResultException::getTrace' => ['list\',args?:array}>'], 'MongoResultException::getTraceAsString' => ['string'], 'MongoTimestamp::__construct' => ['void', 'second='=>'int', 'inc='=>'int'], 'MongoTimestamp::__toString' => ['string'], @@ -4334,7 +4334,7 @@ return [ 'MongoWriteConcernException::getLine' => ['int'], 'MongoWriteConcernException::getMessage' => ['string'], 'MongoWriteConcernException::getPrevious' => ['Exception|Throwable'], - 'MongoWriteConcernException::getTrace' => ['list\',args?:array}>'], + 'MongoWriteConcernException::getTrace' => ['list\',args?:array}>'], 'MongoWriteConcernException::getTraceAsString' => ['string'], 'MultipleIterator::__construct' => ['void', 'flags='=>'int'], 'MultipleIterator::attachIterator' => ['void', 'iterator'=>'Iterator', 'infos='=>'string'], @@ -4515,7 +4515,7 @@ return [ 'OutOfBoundsException::getLine' => ['int'], 'OutOfBoundsException::getMessage' => ['string'], 'OutOfBoundsException::getPrevious' => ['Throwable|OutOfBoundsException|null'], - 'OutOfBoundsException::getTrace' => ['list\',args?:array}>'], + 'OutOfBoundsException::getTrace' => ['list\',args?:array}>'], 'OutOfBoundsException::getTraceAsString' => ['string'], 'OutOfRangeException::__clone' => ['void'], 'OutOfRangeException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?OutOfRangeException'], @@ -4525,7 +4525,7 @@ return [ 'OutOfRangeException::getLine' => ['int'], 'OutOfRangeException::getMessage' => ['string'], 'OutOfRangeException::getPrevious' => ['Throwable|OutOfRangeException|null'], - 'OutOfRangeException::getTrace' => ['list\',args?:array}>'], + 'OutOfRangeException::getTrace' => ['list\',args?:array}>'], 'OutOfRangeException::getTraceAsString' => ['string'], 'OuterIterator::current' => ['mixed'], 'OuterIterator::getInnerIterator' => ['Iterator'], @@ -4541,7 +4541,7 @@ return [ 'OverflowException::getLine' => ['int'], 'OverflowException::getMessage' => ['string'], 'OverflowException::getPrevious' => ['Throwable|OverflowException|null'], - 'OverflowException::getTrace' => ['list\',args?:array}>'], + 'OverflowException::getTrace' => ['list\',args?:array}>'], 'OverflowException::getTraceAsString' => ['string'], 'OwsrequestObj::__construct' => ['void'], 'OwsrequestObj::addParameter' => ['int', 'name'=>'string', 'value'=>'string'], @@ -4895,7 +4895,7 @@ return [ 'PDOException::getLine' => ['int'], 'PDOException::getMessage' => ['string'], 'PDOException::getPrevious' => ['?Throwable'], - 'PDOException::getTrace' => ['list\',args?:array}>'], + 'PDOException::getTrace' => ['list\',args?:array}>'], 'PDOException::getTraceAsString' => ['string'], 'PDOStatement::__sleep' => ['list'], 'PDOStatement::__wakeup' => ['void'], @@ -4988,7 +4988,7 @@ return [ 'ParseError::getLine' => ['int'], 'ParseError::getMessage' => ['string'], 'ParseError::getPrevious' => ['Throwable|ParseError|null'], - 'ParseError::getTrace' => ['list\',args?:array}>'], + 'ParseError::getTrace' => ['list\',args?:array}>'], 'ParseError::getTraceAsString' => ['string'], 'Phar::__construct' => ['void', 'fname'=>'string', 'flags='=>'int', 'alias='=>'string'], 'Phar::addEmptyDir' => ['void', 'dirname'=>'string'], @@ -5162,7 +5162,7 @@ return [ 'RangeException::getLine' => ['int'], 'RangeException::getMessage' => ['string'], 'RangeException::getPrevious' => ['Throwable|RangeException|null'], - 'RangeException::getTrace' => ['list\',args?:array}>'], + 'RangeException::getTrace' => ['list\',args?:array}>'], 'RangeException::getTraceAsString' => ['string'], 'RarArchive::__toString' => ['string'], 'RarArchive::close' => ['bool'], @@ -5192,7 +5192,7 @@ return [ 'RarException::getLine' => ['int'], 'RarException::getMessage' => ['string'], 'RarException::getPrevious' => ['Exception|Throwable'], - 'RarException::getTrace' => ['list\',args?:array}>'], + 'RarException::getTrace' => ['list\',args?:array}>'], 'RarException::getTraceAsString' => ['string'], 'RarException::isUsingExceptions' => ['bool'], 'RarException::setUsingExceptions' => ['RarEntry', 'using_exceptions'=>'bool'], @@ -6249,7 +6249,7 @@ return [ 'RuntimeException::getLine' => ['int'], 'RuntimeException::getMessage' => ['string'], 'RuntimeException::getPrevious' => ['Throwable|RuntimeException|null'], - 'RuntimeException::getTrace' => ['list\',args?:array}>'], + 'RuntimeException::getTrace' => ['list\',args?:array}>'], 'RuntimeException::getTraceAsString' => ['string'], 'SAMConnection::commit' => ['bool'], 'SAMConnection::connect' => ['bool', 'protocol'=>'string', 'properties='=>'array'], @@ -6409,7 +6409,7 @@ return [ 'SQLiteException::getLine' => ['int'], 'SQLiteException::getMessage' => ['string'], 'SQLiteException::getPrevious' => ['RuntimeException|Throwable|null'], - 'SQLiteException::getTrace' => ['list\',args?:array}>'], + 'SQLiteException::getTrace' => ['list\',args?:array}>'], 'SQLiteException::getTraceAsString' => ['string'], 'SQLiteResult::__construct' => ['void'], 'SQLiteResult::column' => ['mixed', 'index_or_name'=>'', 'decode_binary='=>'bool'], @@ -6843,7 +6843,7 @@ return [ 'SoapFault::getLine' => ['int'], 'SoapFault::getMessage' => ['string'], 'SoapFault::getPrevious' => ['?Exception|?Throwable'], - 'SoapFault::getTrace' => ['list\',args?:array}>'], + 'SoapFault::getTrace' => ['list\',args?:array}>'], 'SoapFault::getTraceAsString' => ['string'], 'SoapHeader::SoapHeader' => ['object', 'namespace'=>'string', 'name'=>'string', 'data='=>'mixed', 'mustunderstand='=>'bool', 'actor='=>'string'], 'SoapHeader::__construct' => ['void', 'namespace'=>'string', 'name'=>'string', 'data='=>'mixed', 'mustunderstand='=>'bool', 'actor='=>'string'], @@ -6953,7 +6953,7 @@ return [ 'SolrClientException::getLine' => ['int'], 'SolrClientException::getMessage' => ['string'], 'SolrClientException::getPrevious' => ['?Exception|?Throwable'], - 'SolrClientException::getTrace' => ['list\',args?:array}>'], + 'SolrClientException::getTrace' => ['list\',args?:array}>'], 'SolrClientException::getTraceAsString' => ['string'], 'SolrCollapseFunction::__construct' => ['void', 'field'=>'string'], 'SolrCollapseFunction::__toString' => ['string'], @@ -7245,7 +7245,7 @@ return [ 'SolrException::getLine' => ['int'], 'SolrException::getMessage' => ['string'], 'SolrException::getPrevious' => ['Exception|Throwable'], - 'SolrException::getTrace' => ['list\',args?:array}>'], + 'SolrException::getTrace' => ['list\',args?:array}>'], 'SolrException::getTraceAsString' => ['string'], 'SolrGenericResponse::__construct' => ['void'], 'SolrGenericResponse::__destruct' => ['void'], @@ -7270,7 +7270,7 @@ return [ 'SolrIllegalArgumentException::getLine' => ['int'], 'SolrIllegalArgumentException::getMessage' => ['string'], 'SolrIllegalArgumentException::getPrevious' => ['Exception|Throwable'], - 'SolrIllegalArgumentException::getTrace' => ['list\',args?:array}>'], + 'SolrIllegalArgumentException::getTrace' => ['list\',args?:array}>'], 'SolrIllegalArgumentException::getTraceAsString' => ['string'], 'SolrIllegalOperationException::__clone' => ['void'], 'SolrIllegalOperationException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Exception|?Throwable'], @@ -7282,7 +7282,7 @@ return [ 'SolrIllegalOperationException::getLine' => ['int'], 'SolrIllegalOperationException::getMessage' => ['string'], 'SolrIllegalOperationException::getPrevious' => ['Exception|Throwable'], - 'SolrIllegalOperationException::getTrace' => ['list\',args?:array}>'], + 'SolrIllegalOperationException::getTrace' => ['list\',args?:array}>'], 'SolrIllegalOperationException::getTraceAsString' => ['string'], 'SolrInputDocument::__clone' => ['void'], 'SolrInputDocument::__construct' => ['void'], @@ -7590,7 +7590,7 @@ return [ 'SolrServerException::getLine' => ['int'], 'SolrServerException::getMessage' => ['string'], 'SolrServerException::getPrevious' => ['Exception|Throwable'], - 'SolrServerException::getTrace' => ['list\',args?:array}>'], + 'SolrServerException::getTrace' => ['list\',args?:array}>'], 'SolrServerException::getTraceAsString' => ['string'], 'SolrUpdateResponse::__construct' => ['void'], 'SolrUpdateResponse::__destruct' => ['void'], @@ -8085,7 +8085,7 @@ return [ 'Throwable::getLine' => ['int'], 'Throwable::getMessage' => ['string'], 'Throwable::getPrevious' => ['?Throwable'], - 'Throwable::getTrace' => ['list\',args?:array}>'], + 'Throwable::getTrace' => ['list\',args?:array}>'], 'Throwable::getTraceAsString' => ['string'], 'TokyoTyrant::__construct' => ['void', 'host='=>'string', 'port='=>'int', 'options='=>'array'], 'TokyoTyrant::add' => ['int|float', 'key'=>'string', 'increment'=>'float', 'type='=>'int'], @@ -8157,7 +8157,7 @@ return [ 'TypeError::getLine' => ['int'], 'TypeError::getMessage' => ['string'], 'TypeError::getPrevious' => ['Throwable|TypeError|null'], - 'TypeError::getTrace' => ['list\',args?:array}>'], + 'TypeError::getTrace' => ['list\',args?:array}>'], 'TypeError::getTraceAsString' => ['string'], 'UConverter::__construct' => ['void', 'destination_encoding='=>'string', 'source_encoding='=>'string'], 'UConverter::convert' => ['string', 'string'=>'string', 'reverse='=>'bool'], @@ -8186,7 +8186,7 @@ return [ 'UnderflowException::getLine' => ['int'], 'UnderflowException::getMessage' => ['string'], 'UnderflowException::getPrevious' => ['Throwable|UnderflowException|null'], - 'UnderflowException::getTrace' => ['list\',args?:array}>'], + 'UnderflowException::getTrace' => ['list\',args?:array}>'], 'UnderflowException::getTraceAsString' => ['string'], 'UnexpectedValueException::__clone' => ['void'], 'UnexpectedValueException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable|?UnexpectedValueException'], @@ -8196,7 +8196,7 @@ return [ 'UnexpectedValueException::getLine' => ['int'], 'UnexpectedValueException::getMessage' => ['string'], 'UnexpectedValueException::getPrevious' => ['Throwable|UnexpectedValueException|null'], - 'UnexpectedValueException::getTrace' => ['list\',args?:array}>'], + 'UnexpectedValueException::getTrace' => ['list\',args?:array}>'], 'UnexpectedValueException::getTraceAsString' => ['string'], 'V8Js::__construct' => ['void', 'object_name='=>'string', 'variables='=>'array', 'extensions='=>'array', 'report_uncaught_exceptions='=>'bool', 'snapshot_blob='=>'string'], 'V8Js::clearPendingException' => [''], @@ -8231,7 +8231,7 @@ return [ 'V8JsScriptException::getLine' => ['int'], 'V8JsScriptException::getMessage' => ['string'], 'V8JsScriptException::getPrevious' => ['Exception|Throwable'], - 'V8JsScriptException::getTrace' => ['list\',args?:array}>'], + 'V8JsScriptException::getTrace' => ['list\',args?:array}>'], 'V8JsScriptException::getTraceAsString' => ['string'], 'VARIANT::__construct' => ['void', 'value='=>'mixed', 'type='=>'int', 'codepage='=>'int'], 'VarnishAdmin::__construct' => ['void', 'args='=>'array'], @@ -9249,7 +9249,7 @@ return [ 'Yar_Client_Exception::getLine' => ['int'], 'Yar_Client_Exception::getMessage' => ['string'], 'Yar_Client_Exception::getPrevious' => ['?Exception|?Throwable'], - 'Yar_Client_Exception::getTrace' => ['list\',args?:array}>'], + 'Yar_Client_Exception::getTrace' => ['list\',args?:array}>'], 'Yar_Client_Exception::getTraceAsString' => ['string'], 'Yar_Client_Exception::getType' => ['string'], 'Yar_Concurrent_Client::call' => ['int', 'uri'=>'string', 'method'=>'string', 'parameters'=>'array', 'callback='=>'callable'], @@ -9266,7 +9266,7 @@ return [ 'Yar_Server_Exception::getLine' => ['int'], 'Yar_Server_Exception::getMessage' => ['string'], 'Yar_Server_Exception::getPrevious' => ['?Exception|?Throwable'], - 'Yar_Server_Exception::getTrace' => ['list\',args?:array}>'], + 'Yar_Server_Exception::getTrace' => ['list\',args?:array}>'], 'Yar_Server_Exception::getTraceAsString' => ['string'], 'Yar_Server_Exception::getType' => ['string'], 'ZMQ::__construct' => ['void'], diff --git a/stubs/CoreImmutableClasses.phpstub b/stubs/CoreImmutableClasses.phpstub index 75495ee60..f9c8d6e3e 100644 --- a/stubs/CoreImmutableClasses.phpstub +++ b/stubs/CoreImmutableClasses.phpstub @@ -45,7 +45,7 @@ interface Throwable /** * @psalm-mutation-free - * @return list',args?:array}> + * @return list',args?:array}> */ public function getTrace() : array; @@ -124,7 +124,7 @@ class Exception implements Throwable /** * @psalm-mutation-free - * @return list',args?:array}> + * @return list',args?:array}> */ public final function getTrace() : array {} @@ -201,7 +201,7 @@ class Error implements Throwable /** * @psalm-mutation-free - * @return list',args?:array}> + * @return list',args?:array}> */ public final function getTrace() : array {} From 161a8ae6c4a7e77488693122da6feb16f4dd6be4 Mon Sep 17 00:00:00 2001 From: Mikko Pesari Date: Wed, 13 Apr 2022 17:47:04 +0300 Subject: [PATCH 13/22] Fix openssl_csr_export() signature --- dictionaries/CallMap.php | 2 +- dictionaries/CallMap_80_delta.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 16686e5a5..6c72f4167 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -9313,7 +9313,7 @@ return [ 'opendir' => ['resource|false', 'directory'=>'string', 'context='=>'resource'], 'openlog' => ['bool', 'prefix'=>'string', 'flags'=>'int', 'facility'=>'int'], 'openssl_cipher_iv_length' => ['int|false', 'cipher_algo'=>'string'], -'openssl_csr_export' => ['bool', 'csr'=>'OpenSSLCertificateSigningRequest|string', '&w_output'=>'OpenSSLAsymmetricKey', 'no_text='=>'bool'], +'openssl_csr_export' => ['bool', 'csr'=>'OpenSSLCertificateSigningRequest|string', '&w_output'=>'string', 'no_text='=>'bool'], 'openssl_csr_export_to_file' => ['bool', 'csr'=>'OpenSSLCertificateSigningRequest|string', 'output_filename'=>'string', 'no_text='=>'bool'], 'openssl_csr_get_public_key' => ['OpenSSLAsymmetricKey|false', 'csr'=>'OpenSSLCertificateSigningRequest|string', 'short_names='=>'bool'], 'openssl_csr_get_subject' => ['array|false', 'csr'=>'OpenSSLCertificateSigningRequest|string', 'short_names='=>'bool'], diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index 0d5642bfe..b8637425e 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -971,7 +971,7 @@ return [ ], 'openssl_csr_export' => [ 'old' => ['bool', 'csr'=>'string|resource', '&w_output'=>'string', 'no_text='=>'bool'], - 'new' => ['bool', 'csr'=>'OpenSSLCertificateSigningRequest|string', '&w_output'=>'OpenSSLAsymmetricKey', 'no_text='=>'bool'], + 'new' => ['bool', 'csr'=>'OpenSSLCertificateSigningRequest|string', '&w_output'=>'string', 'no_text='=>'bool'], ], 'openssl_csr_export_to_file' => [ 'old' => ['bool', 'csr'=>'string|resource', 'output_filename'=>'string', 'no_text='=>'bool'], From 23c3d87dccf1918bfedc77377d4a9f14d7b4d4dc Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Fri, 15 Apr 2022 23:40:58 +0900 Subject: [PATCH 14/22] don't emit issues when doing arithmetics on float templates --- .../Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php index f7f7752c1..30bbcf66e 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php @@ -445,7 +445,7 @@ class ArithmeticOpAnalyzer } if ($left_type_part instanceof TTemplateParam || $right_type_part instanceof TTemplateParam) { - if ($left_type_part instanceof TTemplateParam && !$left_type_part->as->isInt()) { + if ($left_type_part instanceof TTemplateParam && !$left_type_part->as->isInt() && !$left_type_part->as->isFloat()) { if ($statements_source && IssueBuffer::accepts( new MixedOperand( 'Left operand cannot be a non-int template', @@ -455,7 +455,7 @@ class ArithmeticOpAnalyzer )) { // fall through } - } elseif ($right_type_part instanceof TTemplateParam && !$right_type_part->as->isInt()) { + } elseif ($right_type_part instanceof TTemplateParam && !$right_type_part->as->isInt() && !$right_type_part->as->isFloat()) { if ($statements_source && IssueBuffer::accepts( new MixedOperand( 'Right operand cannot be a non-int template', From a99532da5eab127f3ce265eb419e1fff6b3beb74 Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Fri, 15 Apr 2022 23:51:00 +0900 Subject: [PATCH 15/22] code format --- .../Expression/BinaryOp/ArithmeticOpAnalyzer.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php index 30bbcf66e..df7c6266a 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php @@ -445,7 +445,10 @@ class ArithmeticOpAnalyzer } if ($left_type_part instanceof TTemplateParam || $right_type_part instanceof TTemplateParam) { - if ($left_type_part instanceof TTemplateParam && !$left_type_part->as->isInt() && !$left_type_part->as->isFloat()) { + if ($left_type_part instanceof TTemplateParam + && !$left_type_part->as->isInt() + && !$left_type_part->as->isFloat() + ) { if ($statements_source && IssueBuffer::accepts( new MixedOperand( 'Left operand cannot be a non-int template', @@ -455,7 +458,10 @@ class ArithmeticOpAnalyzer )) { // fall through } - } elseif ($right_type_part instanceof TTemplateParam && !$right_type_part->as->isInt() && !$right_type_part->as->isFloat()) { + } elseif ($right_type_part instanceof TTemplateParam + && !$right_type_part->as->isInt() + && !$right_type_part->as->isFloat() + ) { if ($statements_source && IssueBuffer::accepts( new MixedOperand( 'Right operand cannot be a non-int template', From b132c3b751de2a4e8c1d88b285bd333f85998a54 Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Fri, 15 Apr 2022 23:53:08 +0900 Subject: [PATCH 16/22] fix error message --- .../Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php index df7c6266a..2aa814c6a 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php @@ -451,7 +451,7 @@ class ArithmeticOpAnalyzer ) { if ($statements_source && IssueBuffer::accepts( new MixedOperand( - 'Left operand cannot be a non-int template', + 'Left operand cannot be a non-numeric template', new CodeLocation($statements_source, $left) ), $statements_source->getSuppressedIssues() @@ -464,7 +464,7 @@ class ArithmeticOpAnalyzer ) { if ($statements_source && IssueBuffer::accepts( new MixedOperand( - 'Right operand cannot be a non-int template', + 'Right operand cannot be a non-numeric template', new CodeLocation($statements_source, $right) ), $statements_source->getSuppressedIssues() From a525342bc7265c8a38a996c52ae1444f9f7a4706 Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Sat, 16 Apr 2022 00:03:19 +0900 Subject: [PATCH 17/22] add test case --- tests/Template/FunctionTemplateTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/Template/FunctionTemplateTest.php b/tests/Template/FunctionTemplateTest.php index b7db1a87b..407e96ebe 100644 --- a/tests/Template/FunctionTemplateTest.php +++ b/tests/Template/FunctionTemplateTest.php @@ -1603,6 +1603,22 @@ class FunctionTemplateTest extends TestCase } }' ], + 'dontScreamForArithmeticsOnFloatTemplates' => [ + ' Date: Mon, 18 Apr 2022 08:58:39 +0300 Subject: [PATCH 18/22] cache statements even without persistent parser cache --- .../Internal/Provider/StatementsProvider.php | 24 ++++- .../Provider/VolatileCacheProvider.php | 99 +++++++++++++++++++ src/Psalm/Internal/RuntimeCaches.php | 2 + 3 files changed, 120 insertions(+), 5 deletions(-) create mode 100644 src/Psalm/Internal/Provider/VolatileCacheProvider.php diff --git a/src/Psalm/Internal/Provider/StatementsProvider.php b/src/Psalm/Internal/Provider/StatementsProvider.php index 3a5cb57fd..5222ecaa0 100644 --- a/src/Psalm/Internal/Provider/StatementsProvider.php +++ b/src/Psalm/Internal/Provider/StatementsProvider.php @@ -55,6 +55,11 @@ class StatementsProvider */ private $file_storage_cache_provider; + /** + * @var ?VolatileCacheProvider + */ + private $volatile_cache_provider; + /** * @var array> */ @@ -98,12 +103,14 @@ class StatementsProvider public function __construct( FileProvider $file_provider, ?ParserCacheProvider $parser_cache_provider = null, - ?FileStorageCacheProvider $file_storage_cache_provider = null + ?FileStorageCacheProvider $file_storage_cache_provider = null, + ?VolatileCacheProvider $volatile_cache_provider = null ) { $this->file_provider = $file_provider; $this->parser_cache_provider = $parser_cache_provider; $this->this_modified_time = filemtime(__FILE__); $this->file_storage_cache_provider = $file_storage_cache_provider; + $this->volatile_cache_provider = $volatile_cache_provider ?: new VolatileCacheProvider(); } /** @@ -126,20 +133,27 @@ class StatementsProvider $config = Config::getInstance(); + $file_content_hash = md5($version . $file_contents); + if (!$this->parser_cache_provider || (!$config->isInProjectDirs($file_path) && strpos($file_path, 'vendor')) ) { + $cache_key = "${file_content_hash}:${php_version}"; + if ($this->volatile_cache_provider->has($cache_key)) { + return $this->volatile_cache_provider->get($cache_key); + } + $progress->debug('Parsing ' . $file_path . "\n"); $has_errors = false; - $stmts = self::parseStatements($file_contents, $php_version, $has_errors, $file_path); + $stmts = self::parseStatements($file_contents, $php_version, $has_errors, $file_path) ?: []; - return $stmts ?: []; + $this->volatile_cache_provider->set($cache_key, $stmts); + + return $stmts; } - $file_content_hash = md5($version . $file_contents); - $stmts = $this->parser_cache_provider->loadStatementsFromCache( $file_path, $modified_time, diff --git a/src/Psalm/Internal/Provider/VolatileCacheProvider.php b/src/Psalm/Internal/Provider/VolatileCacheProvider.php new file mode 100644 index 000000000..57125376a --- /dev/null +++ b/src/Psalm/Internal/Provider/VolatileCacheProvider.php @@ -0,0 +1,99 @@ + + */ + protected $access = []; + + /** + * @var int + */ + protected $max_size; + + /** + * @var VolatileCacheProvider + */ + protected static $instance; + + public function __construct(int $max_size = 4096) + { + $this->max_size = $max_size; + } + + public static function getInstance(): VolatileCacheProvider + { + if (is_null(self::$instance)) { + self::$instance = new self(); + } + + return self::$instance; + } + + public function has(string $key): bool + { + return array_key_exists($key, $this->cache); + } + + /** + * @param string $key + * @return mixed + */ + public function get(string $key) + { + if (! $this->has($key)) { + return null; + } + + $access_index = array_search($key, $this->access); + if (false !== $access_index) { + array_splice($this->access, $access_index, 1); + } + $this->access[] = $key; + + return $this->cache[$key]; + } + + public function set(string $key, &$content): void + { + if (count($this->cache) > $this->max_size) { + reset($this->access); + + $oldest_key_index = key($this->access); + + if (! is_null($oldest_key_index)) { + $oldest_key = $this->access[$oldest_key_index]; + unset($this->cache[$oldest_key]); + unset($this->access[$oldest_key_index]); + } + } + + $this->cache[$key] = & $content; + $this->access[] = $key; + } + + public function clearCache(): void + { + $this->cache = []; + $this->access = []; + } +} diff --git a/src/Psalm/Internal/RuntimeCaches.php b/src/Psalm/Internal/RuntimeCaches.php index b34fa2c34..a144661ae 100644 --- a/src/Psalm/Internal/RuntimeCaches.php +++ b/src/Psalm/Internal/RuntimeCaches.php @@ -14,6 +14,7 @@ use Psalm\Internal\Provider\ClassLikeStorageProvider; use Psalm\Internal\Provider\FileReferenceProvider; use Psalm\Internal\Provider\FileStorageProvider; use Psalm\Internal\Provider\StatementsProvider; +use Psalm\Internal\Provider\VolatileCacheProvider; use Psalm\Internal\Scanner\ParsedDocblock; use Psalm\Internal\Type\TypeTokenizer; use Psalm\IssueBuffer; @@ -38,5 +39,6 @@ abstract class RuntimeCaches StatementsProvider::clearLexer(); StatementsProvider::clearParser(); ParsedDocblock::resetNewlineBetweenAnnotations(); + VolatileCacheProvider::getInstance()->clearCache(); } } From 6afdb0d9b67fa15cca55f5c8c736aa963b48c3ac Mon Sep 17 00:00:00 2001 From: Vitaliy Ognev Date: Mon, 18 Apr 2022 20:58:43 +0300 Subject: [PATCH 19/22] better type safety and inference --- .../Internal/Provider/StatementsProvider.php | 17 +++++------ ...ovider.php => StatementsVolatileCache.php} | 29 ++++++++++++------- src/Psalm/Internal/RuntimeCaches.php | 4 +-- 3 files changed, 29 insertions(+), 21 deletions(-) rename src/Psalm/Internal/Provider/{VolatileCacheProvider.php => StatementsVolatileCache.php} (71%) diff --git a/src/Psalm/Internal/Provider/StatementsProvider.php b/src/Psalm/Internal/Provider/StatementsProvider.php index 5222ecaa0..57456f6e5 100644 --- a/src/Psalm/Internal/Provider/StatementsProvider.php +++ b/src/Psalm/Internal/Provider/StatementsProvider.php @@ -56,9 +56,9 @@ class StatementsProvider private $file_storage_cache_provider; /** - * @var ?VolatileCacheProvider + * @var StatementsVolatileCache */ - private $volatile_cache_provider; + private $statements_volatile_cache; /** * @var array> @@ -103,14 +103,13 @@ class StatementsProvider public function __construct( FileProvider $file_provider, ?ParserCacheProvider $parser_cache_provider = null, - ?FileStorageCacheProvider $file_storage_cache_provider = null, - ?VolatileCacheProvider $volatile_cache_provider = null + ?FileStorageCacheProvider $file_storage_cache_provider = null ) { $this->file_provider = $file_provider; $this->parser_cache_provider = $parser_cache_provider; $this->this_modified_time = filemtime(__FILE__); $this->file_storage_cache_provider = $file_storage_cache_provider; - $this->volatile_cache_provider = $volatile_cache_provider ?: new VolatileCacheProvider(); + $this->statements_volatile_cache = StatementsVolatileCache::getInstance(); } /** @@ -139,17 +138,17 @@ class StatementsProvider || (!$config->isInProjectDirs($file_path) && strpos($file_path, 'vendor')) ) { $cache_key = "${file_content_hash}:${php_version}"; - if ($this->volatile_cache_provider->has($cache_key)) { - return $this->volatile_cache_provider->get($cache_key); + if ($this->statements_volatile_cache->has($cache_key)) { + return $this->statements_volatile_cache->get($cache_key); } $progress->debug('Parsing ' . $file_path . "\n"); $has_errors = false; - $stmts = self::parseStatements($file_contents, $php_version, $has_errors, $file_path) ?: []; + $stmts = self::parseStatements($file_contents, $php_version, $has_errors, $file_path); - $this->volatile_cache_provider->set($cache_key, $stmts); + $this->statements_volatile_cache->set($cache_key, $stmts); return $stmts; } diff --git a/src/Psalm/Internal/Provider/VolatileCacheProvider.php b/src/Psalm/Internal/Provider/StatementsVolatileCache.php similarity index 71% rename from src/Psalm/Internal/Provider/VolatileCacheProvider.php rename to src/Psalm/Internal/Provider/StatementsVolatileCache.php index 57125376a..2dd19ea10 100644 --- a/src/Psalm/Internal/Provider/VolatileCacheProvider.php +++ b/src/Psalm/Internal/Provider/StatementsVolatileCache.php @@ -2,6 +2,9 @@ namespace Psalm\Internal\Provider; +use InvalidArgumentException; +use PhpParser\Node\Stmt; + use function array_key_exists; use function array_search; use function array_splice; @@ -11,17 +14,18 @@ use function key; use function reset; /** + * @internal Owned by StatementsProvider * @todo: track variables size instead */ -class VolatileCacheProvider extends FileProvider +final class StatementsVolatileCache { /** - * @var array + * @var array> */ protected $cache = []; /** - * @var list + * @var array */ protected $access = []; @@ -31,7 +35,7 @@ class VolatileCacheProvider extends FileProvider protected $max_size; /** - * @var VolatileCacheProvider + * @var ?StatementsVolatileCache */ protected static $instance; @@ -40,7 +44,7 @@ class VolatileCacheProvider extends FileProvider $this->max_size = $max_size; } - public static function getInstance(): VolatileCacheProvider + public static function getInstance(): StatementsVolatileCache { if (is_null(self::$instance)) { self::$instance = new self(); @@ -56,12 +60,13 @@ class VolatileCacheProvider extends FileProvider /** * @param string $key - * @return mixed + * @return list + * @throws InvalidArgumentException */ - public function get(string $key) + public function get(string $key): array { if (! $this->has($key)) { - return null; + throw new InvalidArgumentException('Given $key does not exists'); } $access_index = array_search($key, $this->access); @@ -73,7 +78,11 @@ class VolatileCacheProvider extends FileProvider return $this->cache[$key]; } - public function set(string $key, &$content): void + /** + * @param string $key + * @param list $content + */ + public function set(string $key, array $content): void { if (count($this->cache) > $this->max_size) { reset($this->access); @@ -87,7 +96,7 @@ class VolatileCacheProvider extends FileProvider } } - $this->cache[$key] = & $content; + $this->cache[$key] = $content; $this->access[] = $key; } diff --git a/src/Psalm/Internal/RuntimeCaches.php b/src/Psalm/Internal/RuntimeCaches.php index a144661ae..64c398d19 100644 --- a/src/Psalm/Internal/RuntimeCaches.php +++ b/src/Psalm/Internal/RuntimeCaches.php @@ -14,7 +14,7 @@ use Psalm\Internal\Provider\ClassLikeStorageProvider; use Psalm\Internal\Provider\FileReferenceProvider; use Psalm\Internal\Provider\FileStorageProvider; use Psalm\Internal\Provider\StatementsProvider; -use Psalm\Internal\Provider\VolatileCacheProvider; +use Psalm\Internal\Provider\StatementsVolatileCache; use Psalm\Internal\Scanner\ParsedDocblock; use Psalm\Internal\Type\TypeTokenizer; use Psalm\IssueBuffer; @@ -39,6 +39,6 @@ abstract class RuntimeCaches StatementsProvider::clearLexer(); StatementsProvider::clearParser(); ParsedDocblock::resetNewlineBetweenAnnotations(); - VolatileCacheProvider::getInstance()->clearCache(); + StatementsVolatileCache::getInstance()->clearCache(); } } From b2d357fbb82c1dd75ef95ca3ebb5a35a8983d414 Mon Sep 17 00:00:00 2001 From: Paul Fedorow Date: Sat, 23 Apr 2022 14:55:08 +0200 Subject: [PATCH 20/22] Fix return type of `ldap_search` --- dictionaries/CallMap.php | 2 +- dictionaries/CallMap_81_delta.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 6c72f4167..50c8a3f1d 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -6822,7 +6822,7 @@ return [ 'ldap_rename' => ['bool', 'ldap'=>'LDAP\Connection', 'dn'=>'string', 'new_rdn'=>'string', 'new_parent'=>'string', 'delete_old_rdn'=>'bool'], 'ldap_rename_ext' => ['LDAP\Connection|false', 'ldap'=>'LDAP\Connection', 'dn'=>'string', 'new_rdn'=>'string', 'new_parent'=>'string', 'delete_old_rdn'=>'bool', 'controls='=>'array'], 'ldap_sasl_bind' => ['bool', 'ldap'=>'LDAP\Connection', 'dn='=>'string', 'password='=>'string', 'mech='=>'string', 'realm='=>'string', 'authc_id='=>'string', 'authz_id='=>'string', 'props='=>'string'], -'ldap_search' => ['LDAP\Connection|false', 'ldap'=>'LDAP\Connection|LDAP\Connection[]', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int'], +'ldap_search' => ['LDAP\Result|false', 'ldap'=>'LDAP\Connection|LDAP\Connection[]', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int'], 'ldap_set_option' => ['bool', 'ldap'=>'LDAP\Connection|null', 'option'=>'int', 'value'=>'mixed'], 'ldap_set_rebind_proc' => ['bool', 'ldap'=>'LDAP\Connection', 'callback'=>'?callable'], 'ldap_start_tls' => ['bool', 'ldap'=>'resource'], diff --git a/dictionaries/CallMap_81_delta.php b/dictionaries/CallMap_81_delta.php index 51b521e9a..4f6092ad6 100644 --- a/dictionaries/CallMap_81_delta.php +++ b/dictionaries/CallMap_81_delta.php @@ -627,7 +627,7 @@ return [ ], 'ldap_search' => [ 'old' => ['resource|false', 'ldap'=>'resource|resource[]', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int'], - 'new' => ['LDAP\Connection|false', 'ldap'=>'LDAP\Connection|LDAP\Connection[]', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int'], + 'new' => ['LDAP\Result|false', 'ldap'=>'LDAP\Connection|LDAP\Connection[]', 'base'=>'string', 'filter'=>'string', 'attributes='=>'array', 'attributes_only='=>'int', 'sizelimit='=>'int', 'timelimit='=>'int', 'deref='=>'int'], ], 'ldap_set_option' => [ 'old' => ['bool', 'ldap'=>'resource|null', 'option'=>'int', 'value'=>'mixed'], From cb10e845e0975e4c7904fcbd1fee06e8bdf449c2 Mon Sep 17 00:00:00 2001 From: ging-dev Date: Mon, 25 Apr 2022 17:43:23 +0700 Subject: [PATCH 21/22] improve LSP --- .../LanguageServer/LanguageServer.php | 5 ---- .../LanguageServer/Server/TextDocument.php | 25 +++---------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/src/Psalm/Internal/LanguageServer/LanguageServer.php b/src/Psalm/Internal/LanguageServer/LanguageServer.php index b78e41d3a..3a049a620 100644 --- a/src/Psalm/Internal/LanguageServer/LanguageServer.php +++ b/src/Psalm/Internal/LanguageServer/LanguageServer.php @@ -142,11 +142,6 @@ class LanguageServer extends Dispatcher return; } - /** @psalm-suppress UndefinedPropertyFetch */ - if ($msg->body->method === 'textDocument/signatureHelp') { - $this->doAnalysis(); - } - $result = null; $error = null; try { diff --git a/src/Psalm/Internal/LanguageServer/Server/TextDocument.php b/src/Psalm/Internal/LanguageServer/Server/TextDocument.php index d495090e2..e4b4d1b94 100644 --- a/src/Psalm/Internal/LanguageServer/Server/TextDocument.php +++ b/src/Psalm/Internal/LanguageServer/Server/TextDocument.php @@ -6,7 +6,6 @@ namespace Psalm\Internal\LanguageServer\Server; use Amp\Promise; use Amp\Success; -use InvalidArgumentException; use LanguageServerProtocol\CompletionList; use LanguageServerProtocol\Hover; use LanguageServerProtocol\Location; @@ -27,7 +26,6 @@ use Psalm\Internal\Analyzer\ProjectAnalyzer; use Psalm\Internal\LanguageServer\LanguageServer; use UnexpectedValueException; -use function array_combine; use function array_values; use function count; use function error_log; @@ -92,8 +90,9 @@ class TextDocument * The document save notification is sent from the client to the server when the document was saved in the client * * @param TextDocumentItem $textDocument the document that was opened + * @param ?string $text the content when saved */ - public function didSave(TextDocumentItem $textDocument): void + public function didSave(TextDocumentItem $textDocument, ?string $text): void { $file_path = LanguageServer::uriToPath($textDocument->uri); @@ -103,7 +102,7 @@ class TextDocument // reopen file $this->codebase->removeTemporaryFileChanges($file_path); - $this->codebase->file_provider->setOpenContents($file_path, $textDocument->text); + $this->codebase->file_provider->setOpenContents($file_path, (string) $text); $this->server->queueFileAnalysis($file_path, $textDocument->uri); } @@ -122,10 +121,6 @@ class TextDocument return; } - if ($this->project_analyzer->onchange_line_limit === 0) { - return; - } - if (count($contentChanges) === 1 && $contentChanges[0]->range === null) { $new_content = $contentChanges[0]->text; } else { @@ -266,8 +261,6 @@ class TextDocument */ public function completion(TextDocumentIdentifier $textDocument, Position $position): Promise { - $this->server->doAnalysis(); - $file_path = LanguageServer::uriToPath($textDocument->uri); if (!$this->codebase->config->isInProjectDirs($file_path)) { return new Success([]); @@ -361,18 +354,6 @@ class TextDocument return new Success(null); } - $all_file_paths_to_analyze = [$file_path]; - $this->codebase->analyzer->addFilesToAnalyze( - array_combine($all_file_paths_to_analyze, $all_file_paths_to_analyze) - ); - - try { - $this->codebase->analyzer->analyzeFiles($this->project_analyzer, 1, false); - } catch (UnexpectedValueException | InvalidArgumentException $e) { - error_log('codeAction errored on file ' . $file_path. ', Reason: '.$e->getMessage()); - return new Success(null); - } - $issues = $this->server->getCurrentIssues(); if (empty($issues[$file_path])) { From 70b44d566f5fa2fae3411d601a6984a52ed2ec68 Mon Sep 17 00:00:00 2001 From: m1ke Date: Tue, 26 Apr 2022 14:35:33 +0100 Subject: [PATCH 22/22] Alter order of baseline option operations to allow updating custom baseline --- src/Psalm/Internal/Cli/Psalm.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Psalm/Internal/Cli/Psalm.php b/src/Psalm/Internal/Cli/Psalm.php index 0f41c9974..86031b7b6 100644 --- a/src/Psalm/Internal/Cli/Psalm.php +++ b/src/Psalm/Internal/Cli/Psalm.php @@ -1029,10 +1029,6 @@ final class Psalm $issue_baseline = self::generateBaseline($options, $config, $current_dir, $path_to_config); } - if (isset($options['update-baseline'])) { - $issue_baseline = self::updateBaseline($options, $config); - } - if (isset($options['use-baseline'])) { if (!is_string($options['use-baseline'])) { fwrite(STDERR, '--use-baseline must be a string' . PHP_EOL); @@ -1040,10 +1036,15 @@ final class Psalm } $baseline_file_path = $options['use-baseline']; + $config->error_baseline = $baseline_file_path; } else { $baseline_file_path = $config->error_baseline; } + if (isset($options['update-baseline'])) { + $issue_baseline = self::updateBaseline($options, $config); + } + if (!$issue_baseline && $baseline_file_path && !isset($options['ignore-baseline'])) { try { $issue_baseline = ErrorBaseline::read(