I have a project developed in Sulu CMS v2.5.10, and I updated my Symfony to v6, and PHP to v8.2, and in project I have package:
App is returning next error:
!! PHP Fatal error: Declaration of Maxbanton\Cwh\Handler\CloudWatch::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void in /var/www/html/vendor/maxbanton/cwh/src/Handler/CloudWatch.php on line 164
!! PHPERROR:
!! Fatal error: Declaration of Maxbanton\Cwh\Handler\CloudWatch::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void in /var/www/html/vendor/maxbanton/cwh/src/Handler/CloudWatch.php on line 164
!! Symfony\Component\ErrorHandler\Error\FatalError {#8833
!! #message: "Compile Error: Declaration of Maxbanton\Cwh\Handler\CloudWatch::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void"
!! #code: 0
!! #file: "./vendor/maxbanton/cwh/src/Handler/CloudWatch.php"
!! #line: 164
!! -error: array:4 [
!! "type" => 64
!! "message" => "Declaration of Maxbanton\Cwh\Handler\CloudWatch::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void"
!! "file" => "/var/www/html/vendor/maxbanton/cwh/src/Handler/CloudWatch.php"
!! "line" => 164
!! ]
!! }
!!
Any Idea how to solve this?
Switch to
composer require phpnexus/cwh
PhpNexus\Cwh\Handler\CloudWatch