Skip to content

Commit

Permalink
Update ini settings recommandation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Aug 4, 2023
1 parent 49903a4 commit 7138d7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ composer require league/csv:^9.0

## Configuration

**Warning:** If your CSV document was created or is read on a Macintosh computer, add the following lines before
**Warning:** If your CSV document was created or is read on a **Legacy Macintosh computer**, add the following lines before
using the library to help [PHP detect line ending](http://php.net/manual/en/function.fgetcsv.php#refsect1-function.fgetcsv-returnvalues).

```php
Expand All @@ -60,6 +60,8 @@ if (!ini_get('auto_detect_line_endings')) {
}
```

**The ini setting is deprecated since PHP version 8.1 and will be removed in PHP 9.0**

## Testing

The library has:
Expand Down
7 changes: 4 additions & 3 deletions docs/9.0/connections/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ Both classes extend the `League\Csv\AbstractCsv` class and as such share the fol

## OS specificity

If your CSV document was created or is read on a Macintosh computer, add the following lines before using the library to help [PHP detect line ending in Mac OS X](http://php.net/manual/en/function.fgetcsv.php#refsect1-function.fgetcsv-returnvalues).
If your CSV document was created or is read on a **Legacy Macintosh computer**, add the following lines before
using the library to help [PHP detect line ending](http://php.net/manual/en/function.fgetcsv.php#refsect1-function.fgetcsv-returnvalues).

```php
if (!ini_get('auto_detect_line_endings')) {
ini_set('auto_detect_line_endings', '1');
}

//the rest of the code continues here...
```

**The ini setting is deprecated since PHP version 8.1 and will be removed in PHP 9.0**

## Exceptions

The default exception class thrown while using this library is `League\Csv\Exception` which extends PHP `Exception` class.
Expand Down

0 comments on commit 7138d7d

Please sign in to comment.