llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
373 stars 20 forks source link

new setcookie signature not recognized #359

Closed MaMaKow closed 1 year ago

MaMaKow commented 1 year ago

My project uses the new signature of setcookie(), which is available as of PHP 7.3.0: setcookie(string $name, string $value = "", array $options = []): bool But the result of your analysis is 7.0.2

Conditions Analysis

Condition                                    Matches REF      EXT min/Max PHP min/Max
defined(LANG)                                1       user                 4.0.0
defined(LANGUAGE)                            1       user                 4.0.0
defined(LC_COLLATE)                          1       standard 4.0.0       4.0.0
defined(LC_CTYPE)                            1       standard 4.0.0       4.0.0
defined(LC_MESSAGES)                         1       standard 4.0.0       4.0.0
defined(OPENSSL_ALGO_SHA256)                 1       openssl  5.4.8       5.4.8
defined(PHP_VERSION_ID)                      1       Core     5.2.7       5.2.7
defined(PKCS7_TEXT)                          2       openssl  4.0.6       4.0.6
defined(STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT) 1       standard 5.6.0alpha3 5.6.0alpha3
defined(_ZAPCAL)                             5       user                 4.0.0
defined(_ZAPCAL_BASE)                        1       user                 4.0.0
function_exists(gethostname)                 1       standard 5.3.0       5.3.0
function_exists(hash_hmac)                   1       hash     1.1         4.0.0
function_exists(idn_to_ascii)                1       intl     1.0.2       5.2.4
function_exists(imap_rfc822_parse_adrlist)   1       imap     4.0.0       4.0.0
function_exists(mb_convert_encoding)         1       mbstring 4.0.6       4.0.6
function_exists(mb_strlen)                   1       mbstring 4.0.6       4.0.6
function_exists(openssl_random_pseudo_bytes) 1       openssl  5.3.0       5.3.0
function_exists(posix_getpwuid)              1       posix    4.0.0       4.0.0
function_exists(random_bytes)                1       standard 7.0.2       7.0.2
function_exists(sapi_windows_cp_get)         1       user                 4.0.0
function_exists(stream_socket_client)        1       standard 5.0.0       5.0.0
Total [22]                                                                7.0.2

Requires PHP 7.0.2 (min), PHP 7.0.2 (all)

llaville commented 1 year ago

As you've not specified the PHP CompatInfo version used, I'll warn you that to fix this issue, you'll need at least upcoming release 5.4.1 or 5.5.0 of CompatInfo DB (current version is 5.4.0)

llaville commented 1 year ago

FYI issue was fixed on branch 7.0 with commit https://github.com/llaville/php-compatinfo/commit/a6af38b78eb8e97b9f8ad551e0508fc4d45a60af

I'll backport soon to branch 6.5 ASAP (GitHub status is degraded : https://www.githubstatus.com/)

A 6.5.5 release should be possible in next days. No official version of 7.0 but code is ready for prod

llaville commented 1 year ago

Both branches 6.5 and 7.0 are production ready. If you want to give a try. Next releases will be published in 24 hours or less

llaville commented 1 year ago

Included into version 6.5.5 that just been released !