diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 457af5a87..50c8a3f1d 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'=>''], @@ -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'], @@ -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'], @@ -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'], @@ -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_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'], 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'], 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/docs/annotating_code/supported_annotations.md b/docs/annotating_code/supported_annotations.md index e1066f04d..0337e9e7d 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-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. + +```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 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 diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php index f7f7752c1..2aa814c6a 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php @@ -445,20 +445,26 @@ 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', + 'Left operand cannot be a non-numeric template', new CodeLocation($statements_source, $left) ), $statements_source->getSuppressedIssues() )) { // 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', + 'Right operand cannot be a non-numeric template', new CodeLocation($statements_source, $right) ), $statements_source->getSuppressedIssues() 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/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/InstancePropertyFetchAnalyzer.php index 35fb44b1a..1e258a05f 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,8 @@ 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() 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( 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']); } } 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; } diff --git a/src/Psalm/Internal/LanguageServer/Server/TextDocument.php b/src/Psalm/Internal/LanguageServer/Server/TextDocument.php index 25d18f17d..64fae9803 100644 --- a/src/Psalm/Internal/LanguageServer/Server/TextDocument.php +++ b/src/Psalm/Internal/LanguageServer/Server/TextDocument.php @@ -128,11 +128,7 @@ class TextDocument $file_path = LanguageServer::uriToPath($textDocument->uri); - if ($this->project_analyzer->onchange_line_limit === 0) { - return; - } - - if (count($contentChanges) === 1 && isset($contentChanges[0]) && $contentChanges[0]->range === null) { + if (count($contentChanges) === 1 && $contentChanges[0]->range === null) { $new_content = $contentChanges[0]->text; } else { throw new UnexpectedValueException('Not expecting partial diff'); diff --git a/src/Psalm/Internal/Provider/StatementsProvider.php b/src/Psalm/Internal/Provider/StatementsProvider.php index 3a5cb57fd..57456f6e5 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 StatementsVolatileCache + */ + private $statements_volatile_cache; + /** * @var array> */ @@ -104,6 +109,7 @@ class StatementsProvider $this->parser_cache_provider = $parser_cache_provider; $this->this_modified_time = filemtime(__FILE__); $this->file_storage_cache_provider = $file_storage_cache_provider; + $this->statements_volatile_cache = StatementsVolatileCache::getInstance(); } /** @@ -126,19 +132,26 @@ 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->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); - return $stmts ?: []; - } + $this->statements_volatile_cache->set($cache_key, $stmts); - $file_content_hash = md5($version . $file_contents); + return $stmts; + } $stmts = $this->parser_cache_provider->loadStatementsFromCache( $file_path, diff --git a/src/Psalm/Internal/Provider/StatementsVolatileCache.php b/src/Psalm/Internal/Provider/StatementsVolatileCache.php new file mode 100644 index 000000000..2dd19ea10 --- /dev/null +++ b/src/Psalm/Internal/Provider/StatementsVolatileCache.php @@ -0,0 +1,108 @@ +> + */ + protected $cache = []; + + /** + * @var array + */ + protected $access = []; + + /** + * @var int + */ + protected $max_size; + + /** + * @var ?StatementsVolatileCache + */ + protected static $instance; + + public function __construct(int $max_size = 4096) + { + $this->max_size = $max_size; + } + + public static function getInstance(): StatementsVolatileCache + { + 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 list + * @throws InvalidArgumentException + */ + public function get(string $key): array + { + if (! $this->has($key)) { + throw new InvalidArgumentException('Given $key does not exists'); + } + + $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]; + } + + /** + * @param string $key + * @param list $content + */ + public function set(string $key, array $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..64c398d19 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\StatementsVolatileCache; 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(); + StatementsVolatileCache::getInstance()->clearCache(); } } 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 {} diff --git a/tests/DocumentationTest.php b/tests/DocumentationTest.php index 31c392d1a..e55a192e6 100644 --- a/tests/DocumentationTest.php +++ b/tests/DocumentationTest.php @@ -74,18 +74,13 @@ class DocumentationTest extends TestCase */ private const WALL_OF_SHAME = [ '@psalm-assert-untainted', - '@psalm-consistent-constructor', '@psalm-flow', '@psalm-generator-return', - '@psalm-ignore-variable-method', - '@psalm-ignore-variable-property', '@psalm-override-method-visibility', '@psalm-override-property-visibility', '@psalm-scope-this', '@psalm-seal-methods', '@psalm-stub-override', - '@psalm-taint-unescape', - '@psalm-yield', ]; /** @var ProjectAnalyzer */ 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); + } + }', + ], ]; } 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' => [ + '