NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #2598 most downloaded on Packagist
CSV data parser for PHP
Last release 5 years ago
no release in 18 months
Release timing varies
gaps range from 2 months to 3.8 years
Nearly every release is documented
notes for 9 of 9 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
9 releases · first in 2014
Breaking changes: none New features: none
Breaking changes: none
New features: none
Allow _guess_delimiter() to work with a single row of data.
As a consequence,
$csv->auto() now works for files with just one row of data.$csv->autoDetectionForDataString() now works for data strings with just one row of data.See issue #206.
Date: 07-Nov-2021
Bugfix:
$csv->auto()
now works for files with just one row of data.
See issue #206.Breaking changes: none New features: none
One column per quarter.
Breaking changes: none
New features: none
Calling the function parseFile() will now set the $csv->data field.
Until now, the parsed data was only returned.
This adds consistency with $csv->parse() for the following operations on the object.
Date: 20-Jun-2021
Bugfix:
parseFile() will now set $csv->data.
Until now, the parsed data was only returned.
This adds consistency with $csv->parse()
for the following operations on the object.Passing file paths as a parameter to parse() or the constructor new Csv() is now deprecated and will be removed in v2.0.0. Use Csv::parseFile() instea…
If you have questions or feedback about the information below, feel free to open an issue.
Passing file paths as a parameter to parse() or the constructor new Csv() is now deprecated and will be removed in v2.0.0. Use Csv::parseFile() instead.
WARNING: It will call trigger_error() for now.
This may still break your application, depending on your PHP config file. You can remove E_USER_DEPRECATED from the error_reporting mask to avoid breaking your application:
Example:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATED
This change is to avoid security issues: see issue #198.
The function load_data() is deprecated. Call loadFile() or loadDataString() instead.
Supplying CSV data strings (file content) to auto() is deprecated. Please use autoDetectionForDataString().
The motivation is to make subtle gotchas less likely: when the file cannot be found or read by PHP (permissions), its file path would be treated like CSV data.
Currently, there is code to parse .php: <?...?> tags are removed before the remaining file content is treated like a .csv file. This rarely-used functionality will be removed in v2.0.0. You are only affected if you use ParseCsv to parse .php files.
New features: none
Bug fixes: none
Date: 14-Apr-2021
Breaking changes:
Passing file paths to parse() or new Csv() is now deprecated and will be removed in v2.0.0. Use ->parseFile() instead.
WARNING: It will call trigger_error() for now. This may still break your application, depending on your php.ini config. You can add E_USER_DEPRECATED to the error_reporting mask to avoid breaking your application:
Example:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATED
This change is to avoid security issues: see issue #198.
Non-breaking deprecations:
The function load_data() is deprecated. Call loadFile() or loadDataString() instead.
Supplying CSV data (file content) to auto() is deprecated. Please use autoDetectionForDataString().
The motivation is to make subtle gotchas less likely: when the file cannot be found or read by PHP (permissions), its file path would be treated like CSV data.
Currently, there is code to parse .php: <?...?> tags are removed before the remaining file content is treated like a .csv file. This rarely-used functionality will be removed in v2.0.0. You are only affected if you use ParseCsv to parse .php files.
New features: none
Breaking changes: none New features: none Bug fixes: none
Breaking changes: none
New features: none
Bug fixes: none
Code quality / developer experience:
Date: 25-Apr-2020
Breaking changes: none New features: none Bug fixes: none
Code quality:
Compatible with PHP 7.4. Thanks to @andreybolonin @morrislaptop @martijnengler and @fjf2002 .
Breaking changes: none
New features:
$csv->conditions = 'rating IS GREATER THAN 4';Bug fixes:
Code quality:
Date: 07-Jan-2020
Breaking changes: none
New features:
Bug fixes:
Code quality:
Documentation: improved README.md and added an example.
Features added: none
Bugfixes since 1.1.0:
::unparse() bug if array ids don't begin with zero::unparse() bug if no data remains for unparsingMaintenance:
Date: 2-Feb-2019
Breaking changes: none
New features: none
Bug fixes:
Code quality:
Added getCollection method that returns a Illuminate\Support\Collection object - useful for using the mapping functions.
Features:
getCollection method that returns a Illuminate\Support\Collection object - useful for using the mapping functions.getTotalDataRowCount for getting total data row count without parsing all data.Bugfixes:
fread with file_get_contents to avoid the 8192-byte limit. This is important when reading from a stream. Before this fix, the CSV data would be truncated without a warning.Maintenance:
composer.json we now explicitly specify the minimum PHP version as 5.5. Folks, please use 7.x for performance and security, but ParseCSV does support PHP 5.5 and higher.Date: 9-Aug-2018
Breaking changes:
New features:
Bug fixes:
Code quality:
Renamed class from parseCSV to Csv and added namespace ParseCsv for PSR-4 compliance.
Renamed class from parseCSV to Csv and added namespace ParseCsv
for PSR-4 compliance.
Fully PHP 7.2-compatible: This library supports PHP 5.4 to PHP 7.2 - which is
checked by comprehensive PHPUnit tests.
Added support for Microsoft Excel's "sep=" to detect the delimiter (Issue #60).
Added data type detection - function getDatatypes() guesses the type of each column.
Improved MIME type in output() sends correct MIME type to browser
if the separator is a tab (Issue #79).
Added support for using mb_convert_encoding() instead of
iconv() - see issue #109.
Improved documentation.
Fixed a number of minor bugs - see GitHub issues.
Date: 3-March-2018
Renamed class from parseCSV to Csv and added name- space "ParseCsv" for PSR compliance.
Added support for MS Excel's "sep=" to detect the delimiter (Issue #60).
Added data type detection - function getDatatypes() guesses the type of each column.
MIME: output() sends correct MIME type to browser if the separator is a tab char (Issue #79).
Added support for mb_convert_encoding() instead of iconv() - see issue #109.
A number of minor bug fixes - see GitHub issues.
Added many more unit tests.
0.4.5 Brings a new life into parseCSV. Work has begin on updating the code base to PHP 5 standards.
0.4.5 Brings a new life into parseCSV. Work has begin on updating the code base to PHP 5 standards.
Your coding agent can read these notes before it upgrades. Set up the MCP server →