- Issue created by @eelkeblok
- Status changed to Closed: works as designed
over 1 year ago 1:11pm 18 April 2023 - πΊπΈ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 FixedThis 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 runningcomposer 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.