You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ab543f3
Browse filesBrowse the repository at this point in the historyBrowse files
The SDK cannot be installed on PHP 8.4 or 8.5 because composer.json pins
`"php": ">=8.1 <8.4"`. Three deprecations also surface on those versions.
1. `ParseException::__construct()` declared `Exception $previous = null`.
Implicitly nullable parameters are deprecated as of PHP 8.4.
2. `ParseStream::getFileContents()` read the locally scoped
`$http_response_header`, deprecated as of PHP 8.5 in favour of
`http_get_last_response_headers()`.
3. `ParseCurl::close()` called `curl_close()`, deprecated as of PHP 8.5
because it has had no effect since PHP 8.0.
The legacy header read is null coalesced on purpose. On PHP 8.5 a direct
read of `$http_response_header` raises the deprecation at compile time,
so it fires even when the branch never runs, and even inside `isset()`.
Four patterns measured on 8.5.8 and 8.5.12:
isset($http_response_header) ? $http_response_header : [] deprecation
$http_response_header deprecation
$http_response_header ?? [] none
get_defined_vars()['http_response_header'] ?? [] none
A `function_exists()` guard alone is therefore not sufficient.
Verification: all 42 files under src/ pass `php -l` with
`error_reporting=E_ALL` on PHP 8.5, and a live request through the
patched `getFileContents()` returns the response headers on 8.3.32,
8.4.26, 8.5.8 and 8.5.12, with `HTTP/1.1 200 OK` as the first entry.
The upper bound follows #520, which moved to `<8.4` when 8.3 landed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments