Skip to content

Add Ability to Suppress Mac Line Ending Check for CSV Reader#2623

Merged
oleibman merged 2 commits intoPHPOffice:masterfrom
oleibman:autodetect
Mar 1, 2022
Merged

Add Ability to Suppress Mac Line Ending Check for CSV Reader#2623
oleibman merged 2 commits intoPHPOffice:masterfrom
oleibman:autodetect

Conversation

@oleibman
Copy link
Collaborator

With the deprecation of auto_detect_line_endings in Php8.1, there have been some tickets (issue #2609 and PR #2438). Although the deprecation message is suppressed, users with a homegrown error handler may still see it. I am not very concerned about that symptom, but I imagine that there will be more similar tickets in future. This PR adds a new property/method to Reader/CSV to allow the user to avoid the deprecated code, at the negligible cost of being unable to read a CSV with Mac line endings even on a Php version that could support it.

This is:

- [ ] a bugfix
- [x] a new feature

Checklist:

Why this change is needed?

With the deprecation of `auto_detect_line_endings` in Php8.1, there have been some tickets (issue PHPOffice#2609 and PR PHPOffice#2438). Although the deprecation message is suppressed, users with a homegrown error handler may still see it. I am not very concerned about that symptom, but I imagine that there will be more similar tickets in future. This PR adds a new property/method to Reader/CSV to allow the user to avoid the deprecated code, at the negligible cost of being unable to read a CSV with Mac line endings even on a Php version that could support it.
@oleibman oleibman merged commit f575d2b into PHPOffice:master Mar 1, 2022
@oleibman oleibman deleted the autodetect branch April 18, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant