diff --git a/resources/functionMap_php81delta.php b/resources/functionMap_php81delta.php new file mode 100644 index 0000000000..6d55567897 --- /dev/null +++ b/resources/functionMap_php81delta.php @@ -0,0 +1,68 @@ + [ + + ], + 'old' => [ + 'pg_escape_bytea' => ['string', 'connection'=>'resource', 'data'=>'string'], + 'pg_escape_bytea\'1' => ['string', 'data'=>'string'], + 'pg_escape_identifier' => ['string|false', 'connection'=>'resource', 'data'=>'string'], + 'pg_escape_identifier\'1' => ['string', 'data'=>'string'], + 'pg_escape_literal' => ['string|false', 'connection'=>'resource', 'data'=>'string'], + 'pg_escape_literal\'1' => ['string', 'data'=>'string'], + 'pg_escape_string' => ['string', 'connection'=>'resource', 'data'=>'string'], + 'pg_escape_string\'1' => ['string', 'data'=>'string'], + 'pg_execute' => ['resource|false', 'connection'=>'resource', 'stmtname'=>'string', 'params'=>'array'], + 'pg_execute\'1' => ['resource|false', 'stmtname'=>'string', 'params'=>'array'], + 'pg_fetch_object' => ['object|false', 'result'=>'', 'row='=>'?int', 'result_type='=>'int'], + 'pg_fetch_object\'1' => ['object', 'result'=>'', 'row='=>'?int', 'class_name='=>'string', 'ctor_params='=>'array'], + 'pg_fetch_result' => ['', 'result'=>'', 'field_name'=>'string|int'], + 'pg_fetch_result\'1' => ['', 'result'=>'', 'row_number'=>'int', 'field_name'=>'string|int'], + 'pg_field_is_null' => ['int|false', 'result'=>'', 'field_name_or_number'=>'string|int'], + 'pg_field_is_null\'1' => ['int', 'result'=>'', 'row'=>'int', 'field_name_or_number'=>'string|int'], + 'pg_field_prtlen' => ['int|false', 'result'=>'', 'field_name_or_number'=>''], + 'pg_field_prtlen\'1' => ['int', 'result'=>'', 'row'=>'int', 'field_name_or_number'=>'string|int'], + 'pg_lo_export' => ['bool', 'connection'=>'resource', 'oid'=>'int', 'filename'=>'string'], + 'pg_lo_export\'1' => ['bool', 'oid'=>'int', 'pathname'=>'string'], + 'pg_lo_import' => ['int|false', 'connection'=>'resource', 'pathname'=>'string', 'oid'=>''], + 'pg_lo_import\'1' => ['int', 'pathname'=>'string', 'oid'=>''], + 'pg_parameter_status' => ['string|false', 'connection'=>'resource', 'param_name'=>'string'], + 'pg_parameter_status\'1' => ['string|false', 'param_name'=>'string'], + 'pg_prepare' => ['resource|false', 'connection'=>'resource', 'stmtname'=>'string', 'query'=>'string'], + 'pg_prepare\'1' => ['resource|false', 'stmtname'=>'string', 'query'=>'string'], + 'pg_put_line' => ['bool', 'connection'=>'resource', 'data'=>'string'], + 'pg_put_line\'1' => ['bool', 'data'=>'string'], + 'pg_query' => ['resource|false', 'connection'=>'resource', 'query'=>'string'], + 'pg_query\'1' => ['resource|false', 'query'=>'string'], + 'pg_query_params' => ['resource|false', 'connection'=>'resource', 'query'=>'string', 'params'=>'array'], + 'pg_query_params\'1' => ['resource|false', 'query'=>'string', 'params'=>'array'], + 'pg_set_client_encoding' => ['int', 'connection'=>'resource', 'encoding'=>'string'], + 'pg_set_client_encoding\'1' => ['int', 'encoding'=>'string'], + 'pg_set_error_verbosity' => ['int|false', 'connection'=>'resource', 'verbosity'=>'int'], + 'pg_set_error_verbosity\'1' => ['int', 'verbosity'=>'int'], + 'pg_tty' => ['string', 'connection='=>'resource'], + 'pg_tty\'1' => ['string'], + 'pg_untrace' => ['bool', 'connection='=>'resource'], + 'pg_untrace\'1' => ['bool'], + ] +]; diff --git a/src/Reflection/SignatureMap/FunctionSignatureMapProvider.php b/src/Reflection/SignatureMap/FunctionSignatureMapProvider.php index 5eff06d417..fad4da9f5c 100644 --- a/src/Reflection/SignatureMap/FunctionSignatureMapProvider.php +++ b/src/Reflection/SignatureMap/FunctionSignatureMapProvider.php @@ -195,6 +195,15 @@ public function getSignatureMap(): array $signatureMap = $this->computeSignatureMap($signatureMap, $php80MapDelta); } + if ($this->phpVersion->getVersionId() >= 80100) { + $php81MapDelta = require __DIR__ . '/../../../resources/functionMap_php81delta.php'; + if (!is_array($php81MapDelta)) { + throw new ShouldNotHappenException('Signature map could not be loaded.'); + } + + $signatureMap = $this->computeSignatureMap($signatureMap, $php81MapDelta); + } + $this->signatureMap = $signatureMap; }