mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Make deprecation clearer
This commit is contained in:
@@ -5,9 +5,31 @@ Date: ?-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.
|
||||
It will only call trigger_error() for now.
|
||||
This change is to avoid security issues and to make this
|
||||
library easier to learn (less magic).
|
||||
|
||||
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
|
||||
Bug fixes: none
|
||||
|
||||
Reference in New Issue
Block a user