Closed (works as designed)
Project:
CSV Serialization
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2023 at 10:03 UTC
Updated:
5 Sep 2023 at 15:14 UTC
Jump to comment: Most recent
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.