Skip to content

Conversation

@hostep
Copy link
Contributor

@hostep hostep commented Nov 21, 2025

PHP 8.5 got released yesterday: https://www.php.net/archive/2025.php#2025-11-20-3, and yes I know, Magento doesn't support it yet, but we can already prepare for the future a bit here.

Running php compatibility checker on the codebase here results in this output:

FILE: vendor/clerk/magento2/Controller/Logger/ClerkLogger.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------------
 370 | WARNING | Function curl_close() is deprecated since PHP 8.5 (PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated)
 445 | WARNING | Function curl_close() is deprecated since PHP 8.5 (PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated)
 524 | WARNING | Function curl_close() is deprecated since PHP 8.5 (PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated)
----------------------------------------------------------------------------------------------------------------------------------------


FILE: vendor/clerk/magento2/Model/Adapter/Product.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 720 | WARNING | The integer cast is deprecated since PHP 8.5; Use (int) instead (PHPCompatibility.TypeCasts.RemovedTypeCasts.integerDeprecated)
 771 | WARNING | The integer cast is deprecated since PHP 8.5; Use (int) instead (PHPCompatibility.TypeCasts.RemovedTypeCasts.integerDeprecated)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: vendor/clerk/magento2/Model/Api.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------
 183 | WARNING | Function curl_close() is deprecated since PHP 8.5 (PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated)
 204 | WARNING | Function curl_close() is deprecated since PHP 8.5 (PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated)
----------------------------------------------------------------------------------------------------------------------------------------

See:

This PR fixes all these. For the curl_close method, I choose to wrap them in checks to see which PHP version is executed at runtime, according to the docs (see above), this function call only worked on PHP versions lower then 8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant