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 commentedCan you try
--with-dependencieswhen running composer?Like
composer update drupal/csv_serialization --with-dependenciescomposer update drupal/views_data_export --with-dependenciesThat way, composer will also update the latest
league/csvthat fits^7.1https://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 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 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 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 commentedSmall fix to remove the optional param in fetchAssoc as it defaults to 0
Comment #11
acbramley 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/csvComment #14
grasmash commentedComment #15
acbramley commented@grasmash thanks a lot!