Skip to content

Releases: thephpleague/csv

version 9.11.0

23 Sep 10:13
Compare
Choose a tag to compare

Added

  • EscapeFormula::unescapeRecord does the opposite of EscapeFormula::escapeRecord
  • TabularReader::each
  • TabularReader::exists
  • TabularReader::reduce
  • TabularReader::filter
  • TabularReader::slice
  • TabularReader::sorted
  • Reader::addFormatter

All the methods from the TabularReader interface are implemented on the Reader and the ResultSet objects.

Deprecated

  • EscapeFormula::__invoke use EscapeFormula::__escapeRecord instead

Fixed

  • None

Removed

  • None

version 9.10.0

04 Aug 15:17
Compare
Choose a tag to compare

Added

  • Writer::forceEnclosure and Writer::relaxEnclosure to control the presence of enclosure in the generated CSV
  • Writer::getEndOfLine and Writer::setEndOfLine

Deprecated

  • EncloseField stream filter in favor of the new Writer::forceEnclosure method.
  • Writer::getNewline and Writer::setNewline in favor of Writer::getEndOfLine and Writer::setEndOfLine

Fixed

  • Stream::fwrite to allow writing to a file in a normalized way. Internal use.
  • Documentation Fixed removing unreleased documented feature by @nclavaud

Removed

  • None

version 9.9.0

11 Mar 16:00
Compare
Choose a tag to compare

Added

  • TabularDataWriter interface to represent how to write to a tabular data document.
  • TabularDataReader::first to replace TabularDataReader::fetchOne
  • TabularDataReader::nth to replace TabularDataReader::fetchOne
  • CharsetConverter::addBOMSkippingTo to improve BOM skipping see bug #483

Deprecated

  • TabularDataReader::fetchOne

Fixed

  • Stream::createFromResource

  • Stream::__construct is made private. The class is already marked as internal so BC break does not apply on it.

  • Using PHP8 feature to rewrite internal codebase

  • Replaced simple comparisons with strict comparison operator where types are obvious in internal codebase by @astepin

  • Marked class constants explicitly as public by @astepin

  • Minimal support version PHP8.1.2

  • Fix Docblock and method signature using PHP8 feature (Union Type)

  • Fix Internal codebase around seek usage and `#75917 requires PHP8.1.2

  • Remove internal usage of deprecated methods

Removed

  • Stream::fwrite The class is already marked as internal so BC break does not apply on it.
  • Stream::fgets The class is already marked as internal so BC break does not apply on it.
  • Drop support for PHP7 and PHP8.0
  • Polyfill to enable using fputcsv $eol argument

version 9.8.0

04 Jan 00:16
Compare
Choose a tag to compare

Added

  • Added PHP7.4 typed properties where applicable
  • TabularDataReader::fetchColumnByName to replace TabularDataReader::fetchColumn
  • TabularDataReader::fetchColumnByOffset to replace TabularDataReader::fetchColumn

Deprecated

  • TabularDataReader::fetchColumn use TabularDataReader::fetchColumnByOffset or TabularDataReader::fetchColumnByName instead

Fixed

  • AbstractCsv constructor is marked final via docblock.
    The method should never be extended or changed in child classes to avoid unexpected behaviour

Removed

  • PHP7.3 support
  • Remove internal EmptyEscapeParser Polyfill used in Reader class
  • Remove PHP7.4 polyfill features in Writer class

version 9.7.4

30 Nov 07:35
Compare
Choose a tag to compare

Added

  • None

Deprecated

  • None

Fixed

Removed

  • None

version 9.7.3

21 Nov 19:36
Compare
Choose a tag to compare

Added

  • None

Deprecated

  • None

Fixed

  • Update PHPStan requirement for development
  • Improve Documentation generation thanks to pdelre
  • PHP8.1 compliance: using ReturnTypeWillChange to avoid emitting a unnecessary deprecation notice. thanks to cedric-anne

Removed

  • None

version 9.7.2

05 Oct 20:03
Compare
Choose a tag to compare

Added

  • None

Deprecated

  • None

Fixed

  • Update dependencies requirement for development
  • PHP8.1 compliance: replace FILTER_SANITIZE_STRING by FILTER_UNSAFE_RAW
  • PHP8.1 compliance: remove duplicated public properties declaration
  • PHP8.1 compliance: add support for fputcsv $eol argument

Removed

  • None

version 9.7.1

17 Apr 17:26
Compare
Choose a tag to compare

Added

  • None

Deprecated

  • None

Fixed

Removed

  • None

version 9.7.0

26 Mar 22:10
Compare
Choose a tag to compare

Added

  • League\Csv\SyntaxError::duplicateColumnNames to expose column name duplicates during header usage
  • League\Csv\UnableToProcessCsv as the new Exception Marker Interface
  • League\Csv\UnavailableStream as the new Exception
  • League\Csv\Info::getDelimiterStats to replace the namespace function delimiter_detect
  • League\Csv\Info::fetchBOMSequence to replace the namespace function bom_match
  • League\Csv\AbstractCsv::toString to replace League\Csv\AbstractCsv::getContent and League\Csv\AbstractCsv::__toString
  • League\Csv\XMLConverter::create to replace League\Csv\XMLConverter::__construct
  • League\Csv\HTMLConverter::create to replace League\Csv\HTMLConverter::__construct
  • League\Csv\AbstractCsv::supportsStreamFilterOnRead and League\Csv\AbstractCsv::supportsStreamFilterOnWrite to replace League\Csv\AbstractCsv::supportsStreamFilter and League\Csv\AbstractCsv::getStreamFilterMode

Deprecated

  • League\Csv\delimiter_detect use League\Csv\Info::getDelimiterStats
  • League\Csv\bom_match use League\Csv\Info::fetchBOMSequence
  • League\Csv\AbstractCsv::getContent use League\Csv\AbstractCsv::toString
  • League\Csv\AbstractCsv::getStreamFilterMode use League\Csv\AbstractCsv::supportsStreamFilterOnRead or League\Csv\AbstractCsv::supportsStreamFilterOnWrite
  • League\Csv\AbstractCsv::supportsStreamFilter use League\Csv\AbstractCsv::supportsStreamFilterOnRead or League\Csv\AbstractCsv::supportsStreamFilterOnWrite
  • Calling exceptions constructor, use named constructors instead.
  • League\Csv\XMLConverter::__construct use League\Csv\XMLConverter::create
  • League\Csv\HTMLConverter::__construct use League\Csv\HTMLConverter::create

Fixed

  • Move tests into the src directory
  • Fixed encoder method resolver implementation
  • all classes marked as @internal are now final
  • League\Csv\AbstractCsv::STREAM_FILTER_MODE constant replaces League\Csv\AbstractCsv::$stream_filter_mode

Removed

  • Support for PHP7.2
  • League\Csv\AbstractCsv::$stream_filter_mode

version 9.6.2

10 Dec 19:43
Compare
Choose a tag to compare

Added

  • Using Github actions as development tools.

Deprecated

  • None

Fixed

Removed

  • Removing Travis and Scrutinizr as development tools