No indication that it was required (on project page or README.md) or instructions on how to install. After running "composer install" inside the csv_serialization directory, vendor was created successfully, but enabling the module still failed with "CSV Serialization requires the League\Csv library."
| Comment | File | Size | Author |
|---|
Comments
Comment #2
morbus iffComment #3
grasmash commentedDocumentation has been added to the project page regarding this requirement.
Comment #5
XerraX commentedModule wont enable with error "CSV Serialization requires the League\Csv library." even composer installed it in modules vendor path.
Comment #6
grasmash commentedHave you followed the instructions for Using Composer in Drupal? What build methodology are you using?
Comment #7
XerraX commentedI ran "composer install" in drupal root and then in this module's folder. Structure is now like this:
sites\all\modules\csv_serialization\vendor\league\csv

sites\all\modules\csv_serialization\vendor\league\csv\src

Comment #8
XerraX commentedOk i found this tutorial for composer manager, and it installed the dependencies properly.
But now i've lost track of the files i will need to upload to the live site, where composer is not available...
Comment #9
XerraX commentednevermind, got composer installed on live
Comment #10
chrotto commentedI am following the instructions in the tutorial you referred to but I do not manage to get the composer manager initialized.
No errors and nothing seams to happen.
The composer is working properly for me but it looks like init.php in composer_manager/scripts directory is not working. The script is starting but gives no output.
Comment #11
chrotto commentedSorry
I had to run init.php from the composer_manager directory.
Now it works.
Comment #12
chrotto commentedI managed to install this module locally. But I do not managed to install the composer on my live site.
I copied the /vendor/league directory from my local site to the live site but when installing CSV Serialization I get this error:
CSV Serialization requires the League\Csv library.
What more do I have to do?
Comment #13
ehanuise commentedThis is more complex than it should be, not practical for sites where you do not have ssh access to the server, and out of reach for non-developpers/sysadmins.
I had to google to eventually find that composer is a separate software that needs be installed to the server.
I found these install instructions : https://getcomposer.org/download/
After that I think I have installed the league/csv ? At leats the module can be enabled in drupal without complaining the league/csv library is missing
Why is this so complex and different from the usual 'download the library at this location and place it in /libraries or /sites/all/libraries ?
(I'm not a developer. I only have a basic understanding of PHP coding, so I approach this from a drupal user point of view, not the point of view of an experienced drupal developper.)
Comment #14
ehanuise commentedComment #15
grasmash commentedYes, composer is separate software. It will be a requirement of Drupal core in 8.2, as Drupal itself uses composer to manage external dependencies. It is the de facto dependency manager for the PHP community.
It is not legal to ship league/csv with this module, so it must be defined as a separate dependency and downloaded via composer by the implementing developer.
Please follow the referenced instructions provided on Drupal.org for using composer to manage Drupal dependencies. I personally do not recommend using composer_manager.
If you do not have access to your hosting environment, then simply commit your vendor directory to your git repository.
Comment #16
romel.adodis commentedThose who are new to Drupal 8,
Install the composer normally
Step 1:
Modify the composer.json file in your docroot and add the below line under "require" section(append below line if some other library/module already exist)
"require": {
"drupal/csv_serialization": "^1.0"
},
Step 2:
Run "composer require drupal/csv_serialization" from the "docroot directory" in command prompt.
-------------
For "Windows Acquia dev desktop users" if Composer command is not working
try the below in the cmd,
1) cd "sites_doc_root_dir"
2) php.exe "c:/Program Files (x86)/DevDesktop/tools/composer.phar" require drupal/csv_serialization