Skip to content

Commit 808fdff

Browse files
authored
Merge pull request #14 from slashrsm/release/3.0.0
Release 3.0.0: PHP ^8.2 and portphp/portphp ^2.0
2 parents a6fb7ef + a902bd9 commit 808fdff

5 files changed

Lines changed: 24 additions & 6 deletions

File tree

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
- package-ecosystem: composer
9+
directory: /
10+
schedule:
11+
interval: monthly
12+
open-pull-requests-limit: 5
13+
versioning-strategy: widen

UPGRADE-3.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Upgrade from 2.x to 3.0
2+
3+
- Minimum PHP is **8.2** (`^8.2`).
4+
- Requires `portphp/portphp` **^2.0**.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
},
2525
"require": {
2626
"php": "^8.2",
27-
"portphp/portphp": "^1.6.0"
27+
"portphp/portphp": "^2.0"
2828
},
2929
"autoload": {
3030
"psr-4": {
3131
"Port\\Csv\\": "src/"
3232
}
3333
},
3434
"require-dev": {
35-
"phpunit/phpunit": "^9.5"
35+
"phpunit/phpunit": "^9.6"
3636
},
3737
"autoload-dev": {
3838
"psr-4": {
@@ -41,7 +41,7 @@
4141
},
4242
"extra": {
4343
"branch-alias": {
44-
"dev-master": "2.0.x-dev"
44+
"dev-master": "3.0.x-dev"
4545
}
4646
}
4747
}

src/CsvReaderFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Port\Csv;
44

5+
use Port\Reader;
56
use Port\Reader\ReaderFactory;
67

78
/**
@@ -62,7 +63,7 @@ public function __construct(
6263
*
6364
* @return CsvReader
6465
*/
65-
public function getReader(\SplFileObject $file)
66+
public function getReader(\SplFileObject $file): Reader
6667
{
6768
$reader = new CsvReader($file, $this->delimiter, $this->enclosure, $this->escape);
6869

src/CsvWriter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct($delimiter = ',', $enclosure = '"', $stream = null,
5353
/**
5454
* {@inheritdoc}
5555
*/
56-
public function prepare()
56+
public function prepare(): void
5757
{
5858
if ($this->utf8Encoding) {
5959
fprintf($this->getStream(), chr(0xEF) . chr(0xBB) . chr(0xBF));
@@ -63,7 +63,7 @@ public function prepare()
6363
/**
6464
* {@inheritdoc}
6565
*/
66-
public function writeItem(array $item)
66+
public function writeItem(array $item): void
6767
{
6868
if ($this->prependHeaderRow && 1 == $this->row++) {
6969
$headers = array_keys($item);

0 commit comments

Comments
 (0)