Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to install a module named views_data_export. While installing I get the error that csv_serialization can't install because it requires league/csv:^7.1.
League/csv is already installed but with a newer version (8.2). Could the requirement be updated to use the newer version so I don't have to downgrade league/csv?
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff-7-10.txt | 455 bytes | acbramley |
#10 | csv_serialization-2856321-10.patch | 809 bytes | acbramley |
#7 | csv_serialization-2856321-7.patch | 810 bytes | anfor |
Screen Shot 2017-02-27 at 15.19.01.png | 59.59 KB | yassin.barrani |
Comments
Comment #2
RoSk0Yeah, this is not good. Version 8 of League\Csv was release 2015-12-11 and should be used instead.
Comment #3
ndf CreditAttribution: ndf as a volunteer and at Dx Experts commentedCan you try
--with-dependencies
when running composer?Like
composer update drupal/csv_serialization --with-dependencies
composer update drupal/views_data_export --with-dependencies
That way, composer will also update the latest
league/csv
that fits^7.1
https://blog.madewithlove.be/post/tilde-and-caret-constraints/
https://www.jeffgeerling.com/blog/2017/tips-managing-drupal-8-projects-c...
Comment #4
RoSk0Hi @ndf,
The point of this story is to switch to most recent version which is 8.x current version restriction is ^7.1 which is not going to allow composer to use any 8 version.
Comment #5
borisson_@ndf, the advice of @R0sk0 is right here, can we update to version 8.x of the league package or are there big api-changes we need to worry about?
Comment #6
ndf CreditAttribution: ndf as a volunteer and at Dx Experts commented@borisson_
So views_data_export and csv_serialization need a different version of League\Csv
I was too fast with my conclusion (happens sometimes). Therefor: #3 not good :|
The League\Csv 7 and 8 do have some big api-changes. I don't know if we it can be simply upgraded.
Version 7 is unsupported now (http://csv.thephpleague.com/). So I think that csv_serialization must upgrade to 8.
Link with changes: http://csv.thephpleague.com/upgrading/8.0/
Comment #7
anfor CreditAttribution: anfor at Axess Open Web Services for Axess Open Web Services commentedHi,
Looking to the upgrading path, I don't see much changes regarding csv_serialization.
To test I manually updated league/csv from github release 8.2.1 (https://github.com/thephpleague/csv/releases/tag/8.2.1)
Comment #8
colanComment #9
acbramley CreditAttribution: acbramley at PreviousNext for Transport for NSW commentedviews_data_export now depends on the csv_serialization module so the dependencies should not conflict. In fact, the Drupal 8 version always has so I'm not sure how you had version conflicts in the first place.
However, league/csv now has a new major version of 9 but this requires PHP 7 or higher so I'm not sure if we should aim for that.
http://csv.thephpleague.com/9.0/
http://csv.thephpleague.com/upgrading/9.0/
Can we please get automated testing added at https://www.drupal.org/node/2567011/qa so tests run on patches in the queue?
I will test #7 manually, but it would be good to get that committed as running patches on composer does not work when dependencies change.
Thanks!
Comment #10
acbramley CreditAttribution: acbramley at PreviousNext for Transport for NSW commentedSmall fix to remove the optional param in fetchAssoc as it defaults to 0
Comment #11
acbramley CreditAttribution: acbramley at PreviousNext for Transport for NSW commentedI've pushed a fork of the module to a public repo including the patch so I can use the updated library. If anyone else wishes to use it before the patch is committed you just need to
1) Add the following to the repositories key of your composer.json file:
2) Add
"drupal/csv_serialization": "dev-dev-2856321"
to your composer requires. (don't ask me why it needs to be dev-dev, I tried a few different things)3) Run
composer update drupal/csv_serialization league/csv
Comment #14
grasmash CreditAttribution: grasmash commentedComment #15
acbramley CreditAttribution: acbramley at PreviousNext for Transport for NSW commented@grasmash thanks a lot!