Skip to content

Commit 3708bad

Browse files
committed
Remove deprecated unix2dos_path option
1 parent ddcc729 commit 3708bad

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ Test1,Test2
5151
* **max_lines** (null | int) : Max lines per CSV file. If lines > max_lines, many files are generated. **Default: null**
5252
* **delimiter** (string) : CSV delimiter. **Default: ,**
5353
* **enclosure** (string) : CSV enclosure. **Default: "**
54-
* **eol** (string - Csv::EOL_ constants) : EOF(End Of Line) character. See **Csv::EOL_** constants. **Default: Csv::EOL_LF**. If **Csv::EOL_CRLF**
55-
is used with PHP ≤ 8.1, **unix2dos** program is required
54+
* **eol** (string - Csv::EOL_ constants) : EOF(End Of Line) character. See **Csv::EOL_** constants. **Default: Csv::EOL_LF**
5655
* **escape** : CSV escape. **Default: \\**
57-
* **unix2dos_path** (string) : Unix2dos path. Only used if eol=Csv::EOL_CRLF with PHP ≤ 8.1. **Default: /usr/bin/unix2dos**
5856
* **add_utf8_bom** (bool) : Add or not UTF8 bom. **Default: false**
5957

6058
## License ##

UPGRADE-2.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# UPGRADE FROM 1.x to 2.0
2+
3+
* Remove deprecated `unix2dos_path` option

src/Csv.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@ class Csv
4444
protected int $fileNumber = 0;
4545
protected int $lines = 0;
4646
protected int $totalLines = 0;
47-
48-
/**
49-
* @deprecated No longer used
50-
*/
51-
protected bool $unixToDos = false;
52-
53-
/**
54-
* @deprecated No longer used
55-
*/
56-
protected string $unixToDosPath;
57-
5847
protected bool $addUtf8Bom = false;
5948

6049
/**
@@ -74,7 +63,6 @@ public function __construct(string $pathDir, string $filename, array $options =
7463
'enclosure' => '"',
7564
'eol' => self::EOL_LF,
7665
'escape' => '\\',
77-
'unix2dos_path' => '/usr/bin/unix2dos',
7866
'add_utf8_bom' => false,
7967
]);
8068
$resolver->setAllowedTypes('header', ['null', 'array']);
@@ -83,9 +71,7 @@ public function __construct(string $pathDir, string $filename, array $options =
8371
$resolver->setAllowedTypes('enclosure', 'string');
8472
$resolver->setAllowedValues('eol', [self::EOL_LF, self::EOL_CRLF]);
8573
$resolver->setAllowedTypes('escape', 'string');
86-
$resolver->setAllowedTypes('unix2dos_path', 'string');
8774
$resolver->setAllowedTypes('add_utf8_bom', 'bool');
88-
$resolver->setDeprecated('unix2dos_path', 'ecommit/csv-table-generator', '1.3');
8975
$this->configureOptions($resolver);
9076
$options = $resolver->resolve($options);
9177

@@ -108,9 +94,6 @@ public function __construct(string $pathDir, string $filename, array $options =
10894
$this->eol = $options['eol'];
10995
$this->escape = $options['escape'];
11096

111-
/* @psalm-suppress DeprecatedProperty */
112-
$this->unixToDosPath = $options['unix2dos_path'];
113-
11497
$this->addUtf8Bom = $options['add_utf8_bom'];
11598

11699
$this->open();

0 commit comments

Comments
 (0)