1.3.0 Release
If you have questions or feedback about the information below, feel free to open an issue.
Breaking change:
-
Passing file paths as a parameter to
parse()or the constructornew Csv()is now deprecated and will be removed in v2.0.0. UseCsv::parseFile()instead.WARNING: It will call
trigger_error()for now.
This may still break your application, depending on your PHP config file. You can removeE_USER_DEPRECATEDfrom theerror_reportingmask to avoid breaking your application:Example:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATEDThis change is to avoid security issues: see issue #198.
Non-breaking deprecations:
-
The function
load_data()is deprecated. CallloadFile()orloadDataString()instead. -
Supplying CSV data strings (file content) to
auto()is deprecated. Please useautoDetectionForDataString().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