Problem/Motivation

The library used stopping to support for 8.x version after 2018-02-18 and moving to 9.x that require PHP 7
https://csv.thephpleague.com/

Proposed resolution

- Update library to 9 version & fix code for new version this information
- Create new 8.x-2.x branch
- Update project page about requirement of PHP7 for 2.x version

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nabiyllin created an issue. See original summary.

r.nabiullin’s picture

Status: Active » Needs review
FileSize
6.87 KB

Also was cleaned code.

andypost’s picture

  1. +++ b/src/Encoder/CsvEncoder.php
    @@ -66,6 +68,13 @@ class CsvEncoder implements EncoderInterface, DecoderInterface {
    +  protected $encoding = 'utf-8';
    

    this looks unused

  2. +++ b/src/Encoder/CsvEncoder.php
    @@ -339,15 +354,19 @@ class CsvEncoder implements EncoderInterface, DecoderInterface {
    +   * @param array $settings
    +   *   Array of settings.
    

    Please add @see to point where settings listed

  3. +++ b/src/Encoder/CsvEncoder.php
    @@ -339,15 +354,19 @@ class CsvEncoder implements EncoderInterface, DecoderInterface {
    -    $this->useUtf8Bom = ($settings['encoding'] === 'utf8' && !empty($settings['utf8_bom']));
    +    $this->useUtf8Bom = ($settings['encoding'] === 'utf-8' && !empty($settings['utf8_bom']));
    

    the change of setting value may break BC, not sure it makes sense to add `-`

andypost’s picture

Title: Update library and fix integration with views_data_export for using different encoding » Consider to release 8.x-2.x and update league/csv to 9.x
Issue summary: View changes
Issue tags: -views_data_export views, -views_data_export, -league, -CSV +PHP 7.0 (duplicate)

Filed separate issue to support more encodings #2954871: Add support for more encondings
Refocusing this one to conversion to 9.x (current stable)

tarasich’s picture

FileSize
6.57 KB
2.66 KB

Removed encoding support from previous patch.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Looks great!

grasmash’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.