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
- Start with a Drupal 9 site.
- Prepare for Drupal 10:
composer require drupal/csv_serialization:^2.0 || ^3.0 - Composer will install
3.0.0-beta1on Drupal 9 site (incorrectly).
Proposed resolution
- Create a new
4.xbranch and4.0.0release based on the current state of3.x. - Revert all Drupal 10 changes on the
3.xbranch making3.xmatch8.x-2.x. - Create a new 3.0.1 release (which will be D9-only).
- 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.
Issue fork csv_serialization-3396149
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
Comment #2
markdorisonComment #3
markdorisonComment #4
markdorisonAfter discussion in Drupal Slack's #drupalorg this is what was suggested:
4.xbranch and4.0.0release based on the current state of3.x.3.xbranch making3.xmatch8.x-2.x.composer require drupal/csv_serialization:^2.0 || ^3.0 || ^4.04.xbecomes the Drupal 10 branch and3.xbecomes the Drupal 9 branch.Comment #5
markdorisonI 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.
Comment #6
markdorisonComment #7
elc commentedThis sounds like quite a sensible path forward.
Thankfully I saw this before trying to upgrade!
I don't quite understand thecomposer require drupal/csv_serialization:^2.0 || ^3.0 || ^4.0aspect, 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."
Comment #10
markdorison3.0.1has been released with Drupal 9.4+ support.4.xbranch has been opened.4.0.0has been released with Drupal 10 support.3.xhave been updated to point to4.x.Comment #11
acbramley commentedD10 sites using views_data_export will be blocked from upgrading until #3397869: Allow csv_serialization 4.x is in
Comment #12
nagender16 commented@acbramly, Thanks you for the #11, the patch in #3397869 is working for me.