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.
Comments
Comment #2
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). #3344110: CsvEncoder::encode must be compatible with Symfony\Component\Serializer\Encoder\EncoderInterface::encodeThis is accurate, but in some cases like this one, the module needs to be updated at the same time as core itself.
Thanks for catching this, we should actually go back and mark 2.x as not compatible with D10. #3354899: 8.x-2.x-dev is incorrectly marked as supporting D10
Comment #3
eelkeblokAh, OK, thanks for the feedback. I guess it would be good to document this in the release notes for 3.0 then.
Comment #4
attheshow commentedThis is definitely confusing having no code branch that works for both D9 and D10. Trying to figure out how update this in our Intercept project (https://drupal.org/project/intercept) 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...
Comment #5
markdorison@attheshow I believe you could allow either
^2.0 || ^3.0in Intercept's version requirements and then Composer will select the right version based on the version of Drupal core.Comment #6
attheshow commentedOh, interesting. I wasn't aware you could use "ors" like that in the composer requirements. I'll try that. Thanks!
Comment #7
hockey2112 commented@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?
Comment #8
markdorison@hockey2112 I am not surprised by the "Nothing to install or update" but I am surprised that composer.json did not change.
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 runningcomposer update --lockand see how that turns out.Comment #9
hockey2112 commentedI was in a time crunch situation, so I ended up uninstalling the module.