Skip to content

Commit

Permalink
Merge pull request #9366 from lptn/php83-dic
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Feb 25, 2023
2 parents 6ac2b8d + c23cb4b commit c0e757c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dictionaries/CallMap.php
Expand Up @@ -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
Expand Down Expand Up @@ -2951,7 +2951,7 @@
'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'=>''],
Expand Down Expand Up @@ -6162,6 +6162,7 @@
'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'],
Expand Down
32 changes: 32 additions & 0 deletions dictionaries/CallMap_83_delta.php
@@ -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' => [
],
];
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Codebase/InternalCallMapHandler.php
Expand Up @@ -36,7 +36,7 @@
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;
Expand Down

0 comments on commit c0e757c

Please sign in to comment.