Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5
- package-ecosystem: composer
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 5
versioning-strategy: widen
4 changes: 4 additions & 0 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Upgrade from 2.x to 3.0

- Minimum PHP is **8.2** (`^8.2`).
- Requires `portphp/portphp` **^2.0**.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
},
"require": {
"php": "^8.2",
"portphp/portphp": "^1.6.0"
"portphp/portphp": "^2.0"
},
"autoload": {
"psr-4": {
"Port\\Csv\\": "src/"
}
},
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.6"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -41,7 +41,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.0.x-dev"
}
}
}
3 changes: 2 additions & 1 deletion src/CsvReaderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Port\Csv;

use Port\Reader;
use Port\Reader\ReaderFactory;

/**
Expand Down Expand Up @@ -62,7 +63,7 @@ public function __construct(
*
* @return CsvReader
*/
public function getReader(\SplFileObject $file)
public function getReader(\SplFileObject $file): Reader
{
$reader = new CsvReader($file, $this->delimiter, $this->enclosure, $this->escape);

Expand Down
4 changes: 2 additions & 2 deletions src/CsvWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct($delimiter = ',', $enclosure = '"', $stream = null,
/**
* {@inheritdoc}
*/
public function prepare()
public function prepare(): void
{
if ($this->utf8Encoding) {
fprintf($this->getStream(), chr(0xEF) . chr(0xBB) . chr(0xBF));
Expand All @@ -63,7 +63,7 @@ public function prepare()
/**
* {@inheritdoc}
*/
public function writeItem(array $item)
public function writeItem(array $item): void
{
if ($this->prependHeaderRow && 1 == $this->row++) {
$headers = array_keys($item);
Expand Down
Loading