From 11467a4f0dab4e3a1beb4aefe85fa898c1e70d57 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff <prudloff@insite.coop> Date: Mon, 20 Jan 2025 15:39:21 +0100 Subject: [PATCH 1/3] Apply patch from #3289094 --- plaintext_encoder.info.yml | 3 +-- src/Encoder/PlaintextEncoder.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plaintext_encoder.info.yml b/plaintext_encoder.info.yml index 6ffc471..475672c 100644 --- a/plaintext_encoder.info.yml +++ b/plaintext_encoder.info.yml @@ -1,6 +1,5 @@ name: 'Plaintext encoder' type: module description: 'Provides plaintext as a serialization format.' -core: '8.x' -core_version_requirement: ^8 || ^9 +core_version_requirement: ^8 || ^9 || ^10 package: Web services diff --git a/src/Encoder/PlaintextEncoder.php b/src/Encoder/PlaintextEncoder.php index e484985..8b7fd36 100644 --- a/src/Encoder/PlaintextEncoder.php +++ b/src/Encoder/PlaintextEncoder.php @@ -27,7 +27,7 @@ class PlaintextEncoder implements EncoderInterface, DecoderInterface { /** * {@inheritdoc} */ - public function supportsEncoding($format) { + public function supportsEncoding($format): bool { return $format == static::$format; } @@ -43,7 +43,7 @@ class PlaintextEncoder implements EncoderInterface, DecoderInterface { * * Uses HTML-safe strings, with several characters escaped. */ - public function encode($data, $format, array $context = []) { + public function encode($data, $format, array $context = []): string { switch (gettype($data)) { case "array": break; -- GitLab From d337dc47ce1155f9493999db18d90c102bf665ef Mon Sep 17 00:00:00 2001 From: Pierre Rudloff <prudloff@insite.coop> Date: Mon, 20 Jan 2025 15:39:39 +0100 Subject: [PATCH 2/3] Drupal 11 compatibility --- plaintext_encoder.info.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plaintext_encoder.info.yml b/plaintext_encoder.info.yml index 475672c..02d1fd5 100644 --- a/plaintext_encoder.info.yml +++ b/plaintext_encoder.info.yml @@ -1,5 +1,5 @@ name: 'Plaintext encoder' type: module description: 'Provides plaintext as a serialization format.' -core_version_requirement: ^8 || ^9 || ^10 +core_version_requirement: ^8 || ^9 || ^10 || ^11 package: Web services -- GitLab From 0b49d0c640c9c0033b44115ded033febd0492a97 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff <prudloff@insite.coop> Date: Mon, 20 Jan 2025 16:34:32 +0100 Subject: [PATCH 3/3] Incompatible declarations --- src/Encoder/PlaintextEncoder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Encoder/PlaintextEncoder.php b/src/Encoder/PlaintextEncoder.php index 8b7fd36..b100be8 100644 --- a/src/Encoder/PlaintextEncoder.php +++ b/src/Encoder/PlaintextEncoder.php @@ -34,7 +34,7 @@ class PlaintextEncoder implements EncoderInterface, DecoderInterface { /** * {@inheritdoc} */ - public function supportsDecoding($format) { + public function supportsDecoding($format): bool { return $format == static::$format; } @@ -125,7 +125,7 @@ class PlaintextEncoder implements EncoderInterface, DecoderInterface { /** * {@inheritdoc} */ - public function decode($data, $format, array $context = []) { + public function decode($data, $format, array $context = []): mixed { $results = []; return $results; } -- GitLab