With:

  • drupal/core: 9.5.9
  • drupal/csv_serialization: 3.0.0
  • symfony/serializer: v4.4.47

I'm getting:

Fatal error: Declaration of Drupal\csv_serialization\Encoder\CsvEncoder::encode($data, string $format, array $context = []): string must be compatible with Symfony\Component\Serializer\Encoder\EncoderInterface::encode($data, $format, array $context = []) in web/modules/contrib/csv_serialization/src/Encoder/CsvEncoder.php on line 122
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Issue summary: View changes
Status: Active » Needs review

Ready

markdorison’s picture

Hey @claudiu.cristea! Version 3.0 is not supported on D9. You will need to upgrade to 3.x at the same time you update Drupal core as it is not possible to support both Drupal 9.x and 10.x in a single release due to a breaking change in EncoderInterface::encode() between Symfony 4.4 (D9) and Symfony 6.2 (D10).

When preparing for an upgrade to Drupal 10 we recommend that you widen your Composer version constraints to allow either 2.x or 3.x: composer require drupal/csv_serialization:^2.0 || ^3.0. This will allow the module to be automatically upgraded when you upgrade Drupal core.

Marking this as "works as designed" even though "designed" isn't really the right word here. Really it's working as expected, though not as we would wish.

claudiu.cristea’s picture

@markdorison, fair enough. Thanks