Compatibilidade do plugin com PHP 8.4
-
Olá, recentemente o WordPress passou a oferecer suporte ao PHP 8.4 e, após atualizar o ambiente, comecei a receber diversos avisos de deprecated relacionados ao plugin PagBank for WooCommerce.
Os avisos indicam que alguns métodos estão utilizando parâmetros com valor padrão
nullsem declarar explicitamente o tipo como anulável (?tipo), o que passou a ser obrigatório no PHP 8.4. Exemplos:- “Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead”.
Esses avisos aparecem em vários pontos do plugin, como:
Deprecated: PagBank_WooCommerce\Presentation\Connect::get_connect_applications() wp-content/plugins/pagbank-for-woocommerce/src/core/Presentation/Connect.php:46 Deprecated: PagBank_WooCommerce\Presentation\Api::__construct() wp-content/plugins/pagbank-for-woocommerce/src/core/Presentation/Api.php:58 Deprecated: PagBank_WooCommerce\Presentation\Api::get_public_key() wp-content/plugins/pagbank-for-woocommerce/src/core/Presentation/Api.php:480 Deprecated: PagBank_WooCommerce\Presentation\Api::log() wp-content/plugins/pagbank-for-woocommerce/src/core/Presentation/Api.php:528 Deprecated: PagBank_WooCommerce\Presentation\Api::log_request_begin() wp-content/plugins/pagbank-for-woocommerce/src/core/Presentation/Api.php:544 Deprecated: PagBank_WooCommerce\Presentation\Api::log_request_error() wp-content/plugins/pagbank-for-woocommerce/src/core/Presentation/Api.php:558 Deprecated: PagBank_WooCommerce\Presentation\Api::log_request_ends() wp-content/plugins/pagbank-for-woocommerce/src/core/Presentation/Api.php:572Um exemplo concreto encontrado no código:
public function log(string $log_id = null)No PHP 8.4, isso precisa ser atualizado para:
public function log(?string $log_id = null)Poderiam verificar e atualizar o plugin para garantir compatibilidade total com o PHP 8.4?
Agradeço desde já pela atenção.
You must be logged in to reply to this topic.