Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Phan\Language\Internal;

/**
* CURRENT PHP TARGET VERSION: 8.0
* CURRENT PHP TARGET VERSION: 8.1
* The version above has to match Psalm\Internal\Codebase\InternalCallMapHandler::PHP_(MAJOR|MINOR)_VERSION
*
* Format
Expand Down Expand Up @@ -382,6 +382,7 @@
'array_intersect_uassoc\'1' => ['associative-array', 'array'=>'array', 'rest'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest'=>'array|callable(mixed,mixed):int'],
'array_intersect_ukey' => ['associative-array', 'array'=>'array', 'rest'=>'array', 'key_compare_func'=>'callable(mixed,mixed):int'],
'array_intersect_ukey\'1' => ['associative-array', 'array'=>'array', 'rest'=>'array', 'arr3'=>'array', 'arg4'=>'array|callable(mixed,mixed):int', '...rest'=>'array|callable(mixed,mixed):int'],
'array_is_list' => ['bool', 'array'=>'array'],
'array_key_exists' => ['bool', 'key'=>'string|int', 'array'=>'array|ArrayObject'],
'array_key_first' => ['int|string|null', 'array'=>'array'],
'array_key_last' => ['int|string|null', 'array'=>'array'],
Expand Down
27 changes: 27 additions & 0 deletions dictionaries/CallMap_81_delta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php // phpcs:ignoreFile

/**
* This contains the information needed to convert the function signatures for php 8.1 to php 8.0 (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.0
* The 'removed' section contains the signatures that were removed in php 8.1
* The 'changed' section contains functions for which the signature has changed for php 8.1.
* Each function in the 'changed' section has an 'old' and a 'new' section,
* representing the function as it was in PHP 8.0 and in PHP 8.1, respectively
*
* @see CallMap.php
*
* @phan-file-suppress PhanPluginMixedKeyNoKey (read by Phan when analyzing this file)
*/
return [
'added' => [
'array_is_list' => ['bool', 'array'=>'array'],
],
'changed' => [

],
'removed' => [

],
];
4 changes: 2 additions & 2 deletions src/Psalm/Internal/Codebase/InternalCallMapHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
class InternalCallMapHandler
{
private const PHP_MAJOR_VERSION = 8;
private const PHP_MINOR_VERSION = 0;
private const PHP_MINOR_VERSION = 1;
private const LOWEST_AVAILABLE_DELTA = 71;

/**
Expand Down Expand Up @@ -404,7 +404,7 @@ public static function getCallMap(): array
$cased_key = strtolower($key);
self::$call_map[$cased_key] = $value;
}

foreach ($diff_call_map['changed'] as $key => ['old' => $value]) {
$cased_key = strtolower($key);
self::$call_map[$cased_key] = $value;
Expand Down