Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jan 21, 2025
1 parent f12cae3 commit fdc3a8e
Show file tree
Hide file tree
Showing 20 changed files with 6,956 additions and 5,802 deletions.
2 changes: 1 addition & 1 deletion bin/gen_base_callmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function typeToString($reflection_type, string $defaultType): string
throw new LogicException('Unexpected reflection class ' . get_class($reflection_type) . ' found.');
}

if ($reflection_type->allowsNull()) {
if ($reflection_type->allowsNull() && $type !== 'mixed') {
$type .= '|null';
}

Expand Down
19 changes: 14 additions & 5 deletions bin/gen_callmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,22 @@
krsort($customMaps);

// Remove redundant and invalid data from custom maps
foreach ($customMaps as $version => $data) {
foreach ($baseMaps[$version] as $func => $descr) {
if ($descr === ($data[$func] ?? null)) {
unset($data[$func]);
foreach ($customMaps as $version => &$data) {
foreach ($baseMaps[$version] as $func => $baseDescr) {
$customDescr = $data[$func] ?? null;
if ($customDescr === null) {
continue;
}
if (str_contains($baseDescr[0], 'null')
&& !str_contains($func, 'Redis')
&& !str_contains($func, 'redis')
&& !str_contains($customDescr[0], 'null')
) {
$data[$func][0] = $baseDescr[0];
}
}
}
$data = normalizeCallMap($data);
} unset($data);

// Merge hand-written full maps into autogenerated full maps, write to files
foreach ($customMaps as $version => $data) {
Expand Down
64 changes: 32 additions & 32 deletions dictionaries/CallMap_74.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,59 +103,59 @@
),
'amqpbasicproperties::getappid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::getclusterid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::getcontentencoding' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::getcontenttype' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::getcorrelationid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::getdeliverymode' =>
array (
0 => 'int',
),
'amqpbasicproperties::getexpiration' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::getheaders' =>
array (
0 => 'array<array-key, mixed>',
),
'amqpbasicproperties::getmessageid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::getpriority' =>
array (
0 => 'int',
),
'amqpbasicproperties::getreplyto' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::gettimestamp' =>
array (
0 => 'string',
0 => 'int|null',
),
'amqpbasicproperties::gettype' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpbasicproperties::getuserid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpchannel::__construct' =>
array (
Expand Down Expand Up @@ -328,11 +328,11 @@
),
'amqpconnection::getcacert' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpconnection::getcert' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpconnection::getconnectionname' =>
array (
Expand All @@ -352,7 +352,7 @@
),
'amqpconnection::getkey' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpconnection::getlogin' =>
array (
Expand Down Expand Up @@ -576,47 +576,47 @@
),
'amqpenvelope::getappid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getbody' =>
array (
0 => 'string',
),
'amqpenvelope::getclusterid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getconsumertag' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getcontentencoding' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getcontenttype' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getcorrelationid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getdeliverymode' =>
array (
0 => 'int',
),
'amqpenvelope::getdeliverytag' =>
array (
0 => 'string',
0 => 'int|null',
),
'amqpenvelope::getexchangename' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getexpiration' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getheader' =>
array (
Expand All @@ -629,31 +629,31 @@
),
'amqpenvelope::getmessageid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getpriority' =>
array (
0 => 'int',
),
'amqpenvelope::getreplyto' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getroutingkey' =>
array (
0 => 'string',
),
'amqpenvelope::gettimestamp' =>
array (
0 => 'string',
0 => 'int|null',
),
'amqpenvelope::gettype' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::getuserid' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpenvelope::hasheader' =>
array (
Expand Down Expand Up @@ -811,11 +811,11 @@
),
'amqpexchange::getname' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpexchange::gettype' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpexchange::hasargument' =>
array (
Expand Down Expand Up @@ -960,7 +960,7 @@
),
'amqpqueue::get' =>
array (
0 => 'AMQPEnvelope|false',
0 => 'AMQPEnvelope|null',
'flags=' => 'int',
),
'amqpqueue::getargument' =>
Expand Down Expand Up @@ -990,7 +990,7 @@
),
'amqpqueue::getname' =>
array (
0 => 'string',
0 => 'null|string',
),
'amqpqueue::hasargument' =>
array (
Expand Down
Loading

0 comments on commit fdc3a8e

Please sign in to comment.