Repository navigation
Commit b9962c2
Include runtime-provided list fingerprints in the result cache metadata
OpenSslCipherMethodsProvider builds its list of supported ciphers by
asking openssl_get_cipher_methods() and then probing every algorithm
with openssl_cipher_iv_length(), and the inferred type follows it:
openssl_cipher_iv_length() on a supported algorithm is int, on an
unsupported one false. MbFunctionsReturnTypeExtensionTrait does the
same with mb_list_encodings().
That list is a property of the PHP build, not of the PHP version. Two
environments running the same PHP_VERSION_ID disagree:
PHP 8.4.25, ubuntu-latest, OpenSSL 3.0.13 -> 212 ciphers
PHP 8.4.25, macos-latest, OpenSSL 3.6.3 -> 208 ciphers
The four missing on macOS are aes-128-cbc-hmac-sha1,
aes-128-cbc-hmac-sha256, aes-256-cbc-hmac-sha1 and
aes-256-cbc-hmac-sha256, so openssl_cipher_iv_length() for one of them
is int on the first and false on the second.
Both hosts load the same extensions, so the phpExtensions metadata is
identical and the cache is reused across the difference, serving the
stale type. Fingerprinting the lists closes that; it costs about 0.2ms
and only runs for extensions that are loaded.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 9effa00 commit b9962c2
2 files changed
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| 138 | + | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| |||
1488 | 1494 | | |
1489 | 1495 | | |
1490 | 1496 | | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1491 | 1506 | | |
1492 | 1507 | | |
1493 | 1508 | | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
1494 | 1548 | | |
1495 | 1549 | | |
1496 | 1550 | | |
| |||
0 commit comments