Skip to content

Commit 2c0e00e

Browse files
committed
avoid conflicting definitions for readgzfile
- official docs don't give it a type at all - in php 8.1-8.4 it defaulted to "0" - in php 8.5 it defaults to "false" phpstan 2.1's database says it's an int, but assigning `false` to int is a syntax error, so let's override that to leave the type unspecified, which is compatible with both `0` and `false`
1 parent 640679f commit 2c0e00e

6 files changed

Lines changed: 13 additions & 10 deletions

File tree

generated/8.1/zlib.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/8.2/zlib.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/8.3/zlib.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/8.4/zlib.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/8.5/zlib.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generator/config/CustomPhpStanFunctionMap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,7 @@
3131
'socket_addrinfo_connect' => ['resource|false', 'addrinfo'=>'resource'], // doesn't return null
3232
'socket_addrinfo_lookup' => ['AddressInfo[]|false', 'node'=>'string', 'service='=>'mixed', 'hints='=>'array'], // returns AddressInfo[], not resource[]
3333
'socket_create_pair' => ['bool', 'domain'=>'int', 'type'=>'int', 'protocol'=>'int', '&w_fd'=>'Socket[]'], // fd is Socket[], not resource[]
34+
35+
// use_include_path is an int in 8.1-8.4 and a bool in 8.5
36+
'readgzfile' => ['0|positive-int|false', 'filename'=>'string', 'use_include_path='=>''],
3437
];

0 commit comments

Comments
 (0)