Release that is compatible with D9 and D10

Created on 18 April 2023, about 1 year ago
Updated 5 September 2023, 10 months ago

Problem/Motivation

There is currently no release of this module that is compatibel with both 9 and 10. This complicates update procedures; the recommended way to get a site updated from 9 to 10 is to get as much code updated to 10 compatible before updating core itself. With the current situation, you need to run version 2.1 on 9, and for 10 you need to move to version 3.

Proposed resolution

I see that the latest code in the 8.x-2.x branch is marked as D10 compatible, so possibly an 8.x-2.2 release might already alleviate this problem.

Remaining tasks

  • Create a release (?)

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

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

Comments & Activities

  • Issue created by @eelkeblok
  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    @eelkeblok We have not found a straightforward way to support both versions due to a breaking change in EncoderInterface::encode() between Symfony 4.4 (D9) and Symfony 6.2 (D10). πŸ› CsvEncoder::encode must be compatible with Symfony\Component\Serializer\Encoder\EncoderInterface::encode Fixed

    This complicates update procedures; the recommended way to get a site updated from Drupal 9 to Drupal 10 is to get as much code updated to Drupal 10 compatible before updating Drupal core itself.

    This is accurate, but in some cases like this one, the module needs to be updated at the same time as core itself.

    I see that the latest code in the 8.x-2.x branch is marked as D10 compatible

    Thanks for catching this, we should actually go back and mark 2.x as not compatible with D10.

  • πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

    Ah, OK, thanks for the feedback. I guess it would be good to document this in the release notes for 3.0 then.

  • πŸ‡ΊπŸ‡ΈUnited States attheshow

    This is definitely confusing having no code branch that works for both D9 and D10. Trying to figure out how update this in our Intercept (https://drupal.org/project/) which currently has this module as a dependency since we're going to be dealing with multiple sites for different organizations that could either be on D9 OR D10 as they all make the transition...

  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    @attheshow I believe you could allow either ^2.0 || ^3.0 in Intercept's version requirements and then Composer will select the right version based on the version of Drupal core.

  • πŸ‡ΊπŸ‡ΈUnited States attheshow

    Oh, interesting. I wasn't aware you could use "ors" like that in the composer requirements. I'll try that. Thanks!

  • πŸ‡ΊπŸ‡ΈUnited States hockey2112

    @markdorison, I am using this command to try to allow either version:

    composer require drupal/csv_serialization:^2.0 || ^3.0

    However, I am receiving the "Nothing to install or update" message and my composer.json remains like this:

    "require": {
    "drupal/csv_serialization": "^2.0",

    Can I manually edit that to look like this?

    "require": {
    "drupal/csv_serialization": "^2.0 || ^3.0",

    Or is there somewhere else I can/should do so?

  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    However, I am receiving the "Nothing to install or update" message and my composer.json remains like this:

    @hockey2112 I am not surprised by the "Nothing to install or update" but I am surprised that composer.json did not change.

    Can I manually edit that to look like this?

    Unsure. If you do that, and then run composer validate, does it report everything as OK? If so, then you should be good to go. If not, then try running composer update --lock and see how that turns out.

  • πŸ‡ΊπŸ‡ΈUnited States hockey2112

    I was in a time crunch situation, so I ended up uninstalling the module.

Production build 0.69.0 2024