diff --git a/composer.json b/composer.json index f00b2c55..af3eed8a 100644 --- a/composer.json +++ b/composer.json @@ -29,8 +29,8 @@ "doctrine/mongodb-odm": "^2.3", "doctrine/orm": "^2.14", "friendsofphp/php-cs-fixer": "^3.4", - "matthiasnoback/symfony-config-test": "^4.2", - "matthiasnoback/symfony-dependency-injection-test": "^4.0", + "matthiasnoback/symfony-config-test": "^4.2 || ^5.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0", "phpoffice/phpspreadsheet": "^1.23", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.0", @@ -41,13 +41,13 @@ "psalm/plugin-phpunit": "^0.18", "psalm/plugin-symfony": "^5.0", "rector/rector": "^0.18", - "symfony/config": "^5.4 || ^6.2", - "symfony/dependency-injection": "^5.4 || ^6.2", - "symfony/http-foundation": "^5.4 || ^6.2", - "symfony/http-kernel": "^5.4 || ^6.2", - "symfony/phpunit-bridge": "^6.2", - "symfony/property-access": "^5.4 || ^6.2", - "symfony/routing": "^5.4 || ^6.2", + "symfony/config": "^5.4 || ^6.2 || ^7.0", + "symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0", + "symfony/http-foundation": "^5.4 || ^6.2 || ^7.0", + "symfony/http-kernel": "^5.4 || ^6.2 || ^7.0", + "symfony/phpunit-bridge": "^6.2 || ^7.0", + "symfony/property-access": "^5.4 || ^6.2 || ^7.0", + "symfony/routing": "^5.4 || ^6.2 || ^7.0", "vimeo/psalm": "^5.0" }, "conflict": { diff --git a/src/Writer/CsvWriterTerminate.php b/src/Writer/CsvWriterTerminate.php index d972e325..6ad6265e 100644 --- a/src/Writer/CsvWriterTerminate.php +++ b/src/Writer/CsvWriterTerminate.php @@ -21,16 +21,16 @@ final class CsvWriterTerminate extends \php_user_filter /** * @param resource $in * @param resource $out - * @param int $consumed + * @param int $rw_consumed * @param bool $closing */ - public function filter($in, $out, &$consumed, $closing): int + public function filter($in, $out, &$rw_consumed, $closing): int { while ($bucket = stream_bucket_make_writeable($in)) { if (isset($this->params['terminate'])) { $bucket->data = preg_replace('/([^\r])\n/', '$1'.$this->params['terminate'], $bucket->data); } - $consumed += $bucket->datalen; + $rw_consumed += $bucket->datalen; stream_bucket_append($out, $bucket); }