1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 22:01:48 +01:00

Merge pull request #9366 from lptn/php83-dic

This commit is contained in:
Bruce Weirdan 2023-02-25 06:54:53 -04:00 committed by GitHub
commit c0e757cfa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 3 deletions

View File

@ -2,7 +2,7 @@
namespace Phan\Language\Internal;
/**
* CURRENT PHP TARGET VERSION: 8.2
* CURRENT PHP TARGET VERSION: 8.3
* The version above has to match Psalm\Internal\Codebase\InternalCallMapHandler::PHP_(MAJOR|MINOR)_VERSION
*
* Format
@ -2951,7 +2951,7 @@ return [
'gc_enable' => ['void'],
'gc_enabled' => ['bool'],
'gc_mem_caches' => ['int'],
'gc_status' => ['array{runs:int,collected:int,threshold:int,roots:int}'],
'gc_status' => ['array{runs:int,collected:int,threshold:int,roots:int,running:bool,protected:bool,full:bool,buffer_size:int}'],
'gd_info' => ['array'],
'gearman_bugreport' => [''],
'gearman_client_add_options' => ['', 'client_object'=>'', 'option'=>''],
@ -6162,6 +6162,7 @@ return [
'json_encode' => ['non-empty-string|false', 'value'=>'mixed', 'flags='=>'int', 'depth='=>'int'],
'json_last_error' => ['int'],
'json_last_error_msg' => ['string'],
'json_validate' => ['bool', 'json'=>'string', 'depth='=>'positive-int', 'flags='=>'int'],
'JsonException::__clone' => ['void'],
'JsonException::__construct' => ['void'],
'JsonException::__toString' => ['string'],

View File

@ -0,0 +1,32 @@
<?php // phpcs:ignoreFile
/**
* This contains the information needed to convert the function signatures for php 8.3 to php 8.2 (and vice versa)
*
* This file has three sections.
* The 'added' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php 8.2
* The 'removed' section contains the signatures that were removed in php 8.3
* The 'changed' section contains functions for which the signature has changed for php 8.3.
* Each function in the 'changed' section has an 'old' and a 'new' section,
* representing the function as it was in PHP 8.2 and in PHP 8.3, respectively
*
* @see CallMap.php
* @see https://php.watch/versions/8.3
*
* @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
*/
return [
'added' => [
'json_validate' => ['bool', 'json'=>'string', 'depth='=>'positive-int', 'flags='=>'int'],
],
'changed' => [
'gc_status' => [
'old' => ['array{runs:int,collected:int,threshold:int,roots:int}'],
'new' => ['array{runs:int,collected:int,threshold:int,roots:int,running:bool,protected:bool,full:bool,buffer_size:int}'],
],
],
'removed' => [
],
];

View File

@ -36,7 +36,7 @@ use function version_compare;
class InternalCallMapHandler
{
private const PHP_MAJOR_VERSION = 8;
private const PHP_MINOR_VERSION = 2;
private const PHP_MINOR_VERSION = 3;
private const LOWEST_AVAILABLE_DELTA = 71;
private static ?int $loaded_php_major_version = null;