Mismatching in class definition and interface

Created on 24 October 2023, about 1 year ago
Updated 16 November 2023, about 1 year ago

Hello

By trying to install/use the 2.0.0-alpha1 version (for D10 compatibility), we're getting following issue:

Fatal error: Declaration of Drupal\webhooks\WebhooksService::encode($data, $format, array $context = []) must be compatible with Symfony\Component\Serializer\Encoder\EncoderInterface::encode(mixed $data, string $format, array $context = []): string in /var/www/html/web/modules/contrib/webhooks/src/WebhooksService.php on line 331
PHP Fatal error:  Declaration of Drupal\webhooks\WebhooksService::encode($data, $format, array $context = []) must be compatible with Symfony\Component\Serializer\Encoder\EncoderInterface::encode(mixed $data, string $format, array $context = []): string in /var/www/html/web/modules/contrib/webhooks/src/WebhooksService.php on line 331

This is, because mentioned methods are not compliant as described into the PHP interface. This seems to be solved in dev release, so attaching patch here, if someone needs it.

Patch on the way...

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇨🇴Colombia waspper

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024