Problem/Motivation

It is not possible to support both Drupal 9.x and 10.x in a single release of this module due to a breaking change in EncoderInterface::encode() between Symfony 4.4 (D9) and Symfony 6.2 (D10): #3344110: CsvEncoder::encode must be compatible with Symfony\Component\Serializer\Encoder\EncoderInterface::encode

However, 3.0.0-beta1 included claimed support for Drupal 9 and Drupal 10. This was incorrect. In 3.0.0-beta2 the module was updated to only include Drupal 10 support and Drupal 9 would remain with the 2.x releases. However, since the beta1 release still exists, users preparing for Drupal 10, but still on Drupal 9, are being updated to 3.0.0-beta1 incorrectly.

composer require drupal/csv_serialization ^3 still works on Drupal 9 because the 3.0.0-beta1 claims Drupal 10 support:

core_version_requirement: ^9.3 || ^10

Steps to reproduce

  1. Start with a Drupal 9 site.
  2. Prepare for Drupal 10: composer require drupal/csv_serialization:^2.0 || ^3.0
  3. Composer will install 3.0.0-beta1 on Drupal 9 site (incorrectly).

Proposed resolution

  1. Create a new 4.x branch and 4.0.0 release based on the current state of 3.x.
  2. Revert all Drupal 10 changes on the 3.x branch making 3.x match 8.x-2.x.
  3. Create a new 3.0.1 release (which will be D9-only).
  4. Update Drupal 10 upgrade instructions on the project page to read: composer require drupal/csv_serialization:^2.0 || ^3.0 || ^4.0

4.x becomes the Drupal 10 branch and 3.x becomes the Drupal 9 branch.

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

joachim created an issue. See original summary.

markdorison’s picture

Title: 3.0 beta versions need to be unpublished » Drupal 9 users being updated to 3.0.0-beta1 incorrectly
Issue summary: View changes
markdorison’s picture

Issue summary: View changes
markdorison’s picture

Issue summary: View changes

After discussion in Drupal Slack's #drupalorg this is what was suggested:

  1. Create a new 4.x branch and 4.0.0 release based on the current state of 3.x.
  2. Revert all Drupal 10 changes on the 3.x branch making 3.x match 8.x-2.x.
  3. Create a new 3.0.1 release (which will be D9-only).
  4. Update Drupal 10 upgrade instructions on the project page to read: composer require drupal/csv_serialization:^2.0 || ^3.0 || ^4.0

4.x becomes the Drupal 10 branch and 3.x becomes the Drupal 9 branch.

markdorison’s picture

Status: Active » Needs review

I believe the changes suggested in #4 should minimize the disruption to users, but I am going to mark this as "needs review" for at least 1 week to allow for any concerns to be raised.

elc’s picture

This sounds like quite a sensible path forward.

Thankfully I saw this before trying to upgrade!

I don't quite understand the composer require drupal/csv_serialization:^2.0 || ^3.0 || ^4.0 aspect, but that may just be lack of knowledge of composer version pinning. Would it not simply be ^4.0 for D10?
On the module project page "This will allow the module to be automatically upgraded when you upgrade Drupal core."

  • markdorison committed c7fdc01a on 3.x
    Issue #3396149 by markdorison: Drupal 9 users being updated to 3.0.0-...
markdorison’s picture

Status: Needs review » Fixed
  • 3.0.1 has been released with Drupal 9.4+ support.
  • 4.x branch has been opened.
  • 4.0.0 has been released with Drupal 10 support.
  • Issues in queue marked for 3.x have been updated to point to 4.x.
  • Upgrade notes/instructions have been updated on the project page (see below).

It is not possible to support both Drupal 9.x and 10.x in a single release of this module 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 3.x or 4.x: composer require drupal/csv_serialization:^3.0 || ^4.0. This will allow the module to be automatically upgraded when you upgrade Drupal core.

acbramley’s picture

D10 sites using views_data_export will be blocked from upgrading until #3397869: Allow csv_serialization 4.x is in

nagender16’s picture

@acbramly, Thanks you for the #11, the patch in #3397869 is working for me.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.