From 8b20bdc4879ee3230acfc822057d1ea71976a2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20Eugon=C3=A9?= Date: Mon, 8 Jan 2024 09:47:49 +0100 Subject: [PATCH] Remove internally deprecated code (#112) * Remove deprecated yokai/batch-box-spout package * Remove deprecated method DoctrineDBALJobExecutionStorage::createSchema --- .github/labeler.yml | 2 - .github/release.yml | 2 - README.md | 1 - composer.json | 3 - phpstan.neon | 1 - src/batch-box-spout/.gitattributes | 6 - .../.github/workflows/lockdown.yml | 27 -- src/batch-box-spout/.gitignore | 4 - src/batch-box-spout/LICENSE | 19 - src/batch-box-spout/README.md | 53 --- src/batch-box-spout/composer.json | 32 -- .../docs/flat-file-item-reader.md | 44 -- .../docs/flat-file-item-writer.md | 41 -- src/batch-box-spout/phpunit.xml | 25 -- .../src/Exception/InvalidRowSizeException.php | 39 -- .../src/Reader/FlatFileReader.php | 93 ----- .../src/Reader/HeaderStrategy.php | 102 ----- .../src/Reader/Options/CSVOptions.php | 42 -- .../src/Reader/Options/ODSOptions.php | 40 -- .../src/Reader/Options/OptionsInterface.php | 35 -- .../src/Reader/Options/SheetFilter.php | 73 ---- .../src/Reader/Options/XLSXOptions.php | 40 -- .../src/Writer/FlatFileWriter.php | 126 ------ .../src/Writer/Options/CSVOptions.php | 33 -- .../src/Writer/Options/ODSOptions.php | 36 -- .../src/Writer/Options/OptionsInterface.php | 25 -- .../src/Writer/Options/XLSXOptions.php | 36 -- .../src/Writer/WriteToSheetItem.php | 50 --- .../tests/Reader/FlatFileReaderTest.php | 302 -------------- .../tests/Reader/fixtures/iso-8859-1.csv | 3 - .../tests/Reader/fixtures/multi-tabs.ods | Bin 8777 -> 0 bytes .../tests/Reader/fixtures/multi-tabs.xlsx | Bin 6375 -> 0 bytes .../tests/Reader/fixtures/sample.csv | 4 - .../tests/Reader/fixtures/sample.ods | Bin 7842 -> 0 bytes .../tests/Reader/fixtures/sample.xlsx | Bin 4750 -> 0 bytes .../tests/Reader/fixtures/wrong-line-size.csv | 4 - .../tests/Writer/FlatFileWriterTest.php | 392 ------------------ src/batch-box-spout/tests/bootstrap.php | 22 - .../src/DoctrineDBALJobExecutionStorage.php | 18 - .../DoctrineDBALJobExecutionStorageTest.php | 8 - src/batch/README.md | 1 - src/batch/composer.json | 1 - src/batch/docs/domain/item-job/item-reader.md | 2 - src/batch/docs/domain/item-job/item-writer.md | 2 - 44 files changed, 1789 deletions(-) delete mode 100644 src/batch-box-spout/.gitattributes delete mode 100644 src/batch-box-spout/.github/workflows/lockdown.yml delete mode 100644 src/batch-box-spout/.gitignore delete mode 100644 src/batch-box-spout/LICENSE delete mode 100644 src/batch-box-spout/README.md delete mode 100644 src/batch-box-spout/composer.json delete mode 100644 src/batch-box-spout/docs/flat-file-item-reader.md delete mode 100644 src/batch-box-spout/docs/flat-file-item-writer.md delete mode 100644 src/batch-box-spout/phpunit.xml delete mode 100644 src/batch-box-spout/src/Exception/InvalidRowSizeException.php delete mode 100644 src/batch-box-spout/src/Reader/FlatFileReader.php delete mode 100644 src/batch-box-spout/src/Reader/HeaderStrategy.php delete mode 100644 src/batch-box-spout/src/Reader/Options/CSVOptions.php delete mode 100644 src/batch-box-spout/src/Reader/Options/ODSOptions.php delete mode 100644 src/batch-box-spout/src/Reader/Options/OptionsInterface.php delete mode 100644 src/batch-box-spout/src/Reader/Options/SheetFilter.php delete mode 100644 src/batch-box-spout/src/Reader/Options/XLSXOptions.php delete mode 100644 src/batch-box-spout/src/Writer/FlatFileWriter.php delete mode 100644 src/batch-box-spout/src/Writer/Options/CSVOptions.php delete mode 100644 src/batch-box-spout/src/Writer/Options/ODSOptions.php delete mode 100644 src/batch-box-spout/src/Writer/Options/OptionsInterface.php delete mode 100644 src/batch-box-spout/src/Writer/Options/XLSXOptions.php delete mode 100644 src/batch-box-spout/src/Writer/WriteToSheetItem.php delete mode 100644 src/batch-box-spout/tests/Reader/FlatFileReaderTest.php delete mode 100644 src/batch-box-spout/tests/Reader/fixtures/iso-8859-1.csv delete mode 100644 src/batch-box-spout/tests/Reader/fixtures/multi-tabs.ods delete mode 100644 src/batch-box-spout/tests/Reader/fixtures/multi-tabs.xlsx delete mode 100644 src/batch-box-spout/tests/Reader/fixtures/sample.csv delete mode 100644 src/batch-box-spout/tests/Reader/fixtures/sample.ods delete mode 100644 src/batch-box-spout/tests/Reader/fixtures/sample.xlsx delete mode 100644 src/batch-box-spout/tests/Reader/fixtures/wrong-line-size.csv delete mode 100644 src/batch-box-spout/tests/Writer/FlatFileWriterTest.php delete mode 100644 src/batch-box-spout/tests/bootstrap.php diff --git a/.github/labeler.yml b/.github/labeler.yml index 2d3e1e22..a2e88bdf 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,8 +1,6 @@ # https://github.com/actions/labeler 'yokai/batch': - 'src/batch/**' -'yokai/batch-box-spout': - - 'src/batch-box-spout/**' 'yokai/batch-doctrine-dbal': - 'src/batch-doctrine-dbal/**' 'yokai/batch-doctrine-orm': diff --git a/.github/release.yml b/.github/release.yml index 973d1422..8939c0da 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -3,8 +3,6 @@ changelog: categories: - title: 'Changes made to the core: `yokai/batch`' labels: ['yokai/batch'] - - title: 'Changes made to the `box/spout` bridge: `yokai/batch-box-spout`' - labels: ['yokai/batch-box-spout'] - title: 'Changes made to the `doctrine/dbal` bridge: `yokai/batch-doctrine-dbal`' labels: ['yokai/batch-doctrine-dbal'] - title: 'Changes made to the `doctrine/orm` bridge: `yokai/batch-doctrine-orm`' diff --git a/README.md b/README.md index 7b9009c9..13f820c5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ Some bridges to popular packages : | Bridge with | | |------------------------------------------------------------------------------------|----------------------------------------------------------------| -| `DEPRECATED` [`box/spout`](https://github.com/yokai-php/batch-box-spout) | Read/Write from/to CSV/ODS/XLSX | | [`doctrine/dbal`](https://github.com/yokai-php/batch-doctrine-dbal) | Read/Write from/to SQL databases | | [`doctrine/orm`](https://github.com/yokai-php/batch-doctrine-orm) | Read from Doctrine ORM entities | | [`doctrine/persistence`](https://github.com/yokai-php/batch-doctrine-persistence) | Write to Doctrine ORM/ODM objects | diff --git a/composer.json b/composer.json index 6bba5f44..d5efd789 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,6 @@ }, "replace": { "yokai/batch": "self.version", - "yokai/batch-box-spout": "self.version", "yokai/batch-doctrine-dbal": "self.version", "yokai/batch-doctrine-orm": "self.version", "yokai/batch-doctrine-persistence": "self.version", @@ -68,7 +67,6 @@ "autoload": { "psr-4": { "Yokai\\Batch\\": "src/batch/src/", - "Yokai\\Batch\\Bridge\\Box\\Spout\\": "src/batch-box-spout/src/", "Yokai\\Batch\\Bridge\\Doctrine\\DBAL\\": "src/batch-doctrine-dbal/src/", "Yokai\\Batch\\Bridge\\Doctrine\\ORM\\": "src/batch-doctrine-orm/src/", "Yokai\\Batch\\Bridge\\Doctrine\\Persistence\\": "src/batch-doctrine-persistence/src/", @@ -88,7 +86,6 @@ "Yokai\\Batch\\Sources\\Tests\\Symfony\\App\\": "tests/symfony/src/", "Yokai\\Batch\\Sources\\Tests\\Symfony\\Tests\\": "tests/symfony/tests/", "Yokai\\Batch\\Tests\\": "src/batch/tests/", - "Yokai\\Batch\\Tests\\Bridge\\Box\\Spout\\": "src/batch-box-spout/tests/", "Yokai\\Batch\\Tests\\Bridge\\Doctrine\\DBAL\\": "src/batch-doctrine-dbal/tests/", "Yokai\\Batch\\Tests\\Bridge\\Doctrine\\ORM\\": "src/batch-doctrine-orm/tests/", "Yokai\\Batch\\Tests\\Bridge\\Doctrine\\Persistence\\": "src/batch-doctrine-persistence/tests/", diff --git a/phpstan.neon b/phpstan.neon index fa3c85ba..bc3a5454 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -5,7 +5,6 @@ parameters: level: max paths: - src/batch/src/ - - src/batch-box-spout/src/ - src/batch-doctrine-dbal/src/ - src/batch-doctrine-orm/src/ - src/batch-doctrine-persistence/src/ diff --git a/src/batch-box-spout/.gitattributes b/src/batch-box-spout/.gitattributes deleted file mode 100644 index 62fd109e..00000000 --- a/src/batch-box-spout/.gitattributes +++ /dev/null @@ -1,6 +0,0 @@ -.gitattributes export-ignore -.gitignore export-ignore -docs/ export-ignore -tests/ export-ignore -LICENSE export-ignore -*.md export-ignore diff --git a/src/batch-box-spout/.github/workflows/lockdown.yml b/src/batch-box-spout/.github/workflows/lockdown.yml deleted file mode 100644 index aee0811b..00000000 --- a/src/batch-box-spout/.github/workflows/lockdown.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: 'Lock down Pull Requests' - -on: - pull_request: - types: opened - -jobs: - lockdown: - runs-on: ubuntu-latest - steps: - - uses: dessant/repo-lockdown@v2 - with: - github-token: ${{ github.token }} - close-pr: true - lock-pr: true - pr-comment: > - Thanks for your pull request! - - However, this repository does not accept pull requests, - see the README for details. - - If you want to contribute, - you should instead open a pull request on the main repository: - - https://github.com/yokai-php/batch-src - - Thank you diff --git a/src/batch-box-spout/.gitignore b/src/batch-box-spout/.gitignore deleted file mode 100644 index 88259615..00000000 --- a/src/batch-box-spout/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/.phpunit.result.cache -/tests/.artifacts/ -/vendor/ -/composer.lock diff --git a/src/batch-box-spout/LICENSE b/src/batch-box-spout/LICENSE deleted file mode 100644 index 83096655..00000000 --- a/src/batch-box-spout/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019 Yann Eugoné - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/batch-box-spout/README.md b/src/batch-box-spout/README.md deleted file mode 100644 index 839d11b6..00000000 --- a/src/batch-box-spout/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# box/spout bridge for Batch processing library - -[![Latest Stable Version](https://img.shields.io/packagist/v/yokai/batch-box-spout?style=flat-square)](https://packagist.org/packages/yokai/batch-box-spout) -[![Downloads Monthly](https://img.shields.io/packagist/dm/yokai/batch-box-spout?style=flat-square)](https://packagist.org/packages/yokai/batch-box-spout) - -[`box/spout`](https://github.com/box/spout) bridge for [Batch](https://github.com/yokai-php/batch) processing library. - - -## :warning: DEPRECATED - -This library is deprecated because the package it relies on was also deprecated. -The library has been replaced with [`openspout/openspout`](https://github.com/openspout/openspout). -And this bridge was replaced with [`yokai/batch-openspout`](https://github.com/yokai-php/batch-openspout). - - -## :warning: BETA - -This library is following [semver](https://semver.org/). -However before we reach the first stable version (`v1.0.0`), we may decide to introduce **API changes in minor versions**. -This is why you should stick to a `v0.[minor].*` requirement ! - - -# Installation - -``` -composer require yokai/batch-box-spout -``` - - -## Documentation - -This package provides: - -- a [item reader](docs/flat-file-item-reader.md) that read from CSV/XLSX/ODS files -- a [item writer](docs/flat-file-item-writer.md) that write to CSV/XLSX/ODS files - - -## Contribution - -This package is a readonly split of a [larger repository](https://github.com/yokai-php/batch-src), -containing all tests and sources for all librairies of the batch universe. - -Please feel free to open an [issue](https://github.com/yokai-php/batch-src/issues) -or a [pull request](https://github.com/yokai-php/batch-src/pulls) -in the [main repository](https://github.com/yokai-php/batch-src). - -The library was originally created by [Yann Eugoné](https://github.com/yann-eugone). -See the list of [contributors](https://github.com/yokai-php/batch-src/contributors). - - -## License - -This library is under MIT [LICENSE](LICENSE). diff --git a/src/batch-box-spout/composer.json b/src/batch-box-spout/composer.json deleted file mode 100644 index 5ffc8131..00000000 --- a/src/batch-box-spout/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "yokai/batch-box-spout", - "description": "box/spout bridge for yokai/batch", - "keywords": ["batch", "job", "reader", "writer", "flat", "csv", "xlsx", "ods"], - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Yann Eugoné", - "email": "eugone.yann@gmail.com" - } - ], - "require": { - "php": "^8.1", - "box/spout": "^3.0", - "yokai/batch": "^0.5.0" - }, - "autoload": { - "psr-4": { - "Yokai\\Batch\\Bridge\\Box\\Spout\\": "src/" - } - }, - "require-dev": { - "phpunit/phpunit": "^9.5", - "symfony/filesystem": "^6.4|^7.0" - }, - "autoload-dev": { - "psr-4": { - "Yokai\\Batch\\Tests\\Bridge\\Box\\Spout\\": "tests/" - } - } -} diff --git a/src/batch-box-spout/docs/flat-file-item-reader.md b/src/batch-box-spout/docs/flat-file-item-reader.md deleted file mode 100644 index 0a831a96..00000000 --- a/src/batch-box-spout/docs/flat-file-item-reader.md +++ /dev/null @@ -1,44 +0,0 @@ -# Item reader with CSV/ODS/XLSX files - -The [FlatFileReader](../src/Reader/FlatFileReader.php) is a reader -that will read from CSV/ODS/XLSX file and return each line as an array. - -```php -setFontBold()->build()), - ['static', 'header', 'keys'] -); -``` - -## On the same subject - -- [What is an item writer ?](https://github.com/yokai-php/batch/blob/0.x/docs/domain/item-job/item-writer.md) diff --git a/src/batch-box-spout/phpunit.xml b/src/batch-box-spout/phpunit.xml deleted file mode 100644 index f2bbace6..00000000 --- a/src/batch-box-spout/phpunit.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - ./tests - - - - - - ./src - - - diff --git a/src/batch-box-spout/src/Exception/InvalidRowSizeException.php b/src/batch-box-spout/src/Exception/InvalidRowSizeException.php deleted file mode 100644 index d50a4b01..00000000 --- a/src/batch-box-spout/src/Exception/InvalidRowSizeException.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ - private array $headers, - /** - * @phpstan-var array - */ - private array $row, - ) { - parent::__construct('Invalid row size'); - } - - /** - * @phpstan-return array - */ - public function getHeaders(): array - { - return $this->headers; - } - - /** - * @phpstan-return array - */ - public function getRow(): array - { - return $this->row; - } -} diff --git a/src/batch-box-spout/src/Reader/FlatFileReader.php b/src/batch-box-spout/src/Reader/FlatFileReader.php deleted file mode 100644 index eb09dc55..00000000 --- a/src/batch-box-spout/src/Reader/FlatFileReader.php +++ /dev/null @@ -1,93 +0,0 @@ -headerStrategy = $headerStrategy ?? HeaderStrategy::skip(); - } - - public function read(): iterable - { - /** @var string $path */ - $path = $this->filePath->get($this->jobExecution); - - $reader = ReaderFactory::createFromFile($path); - $this->options->configure($reader); - $reader->open($path); - - foreach ($this->rows($reader) as $rowIndex => $row) { - if ($rowIndex === 1) { - if (!$this->headerStrategy->setHeaders($row)) { - continue; - } - } - - try { - yield $this->headerStrategy->getItem($row); - } catch (InvalidRowSizeException $exception) { - $this->jobExecution->addWarning( - new Warning( - 'Expecting row {row} to have exactly {expected} columns(s), but got {actual}.', - [ - '{row}' => (string)$rowIndex, - '{expected}' => (string)count($exception->getHeaders()), - '{actual}' => (string)count($exception->getRow()), - ], - ['headers' => $exception->getHeaders(), 'row' => $exception->getRow()] - ) - ); - } - } - - $reader->close(); - } - - /** - * @phpstan-return Generator> - */ - private function rows(ReaderInterface $reader): Generator - { - foreach ($this->options->getSheets($reader) as $sheet) { - /** @var int $rowIndex */ - /** @var Row|array $row */ - foreach ($sheet->getRowIterator() as $rowIndex => $row) { - if ($row instanceof Row) { - /** @var array $row */ - $row = $row->toArray(); - } - - yield $rowIndex => $row; - } - } - } -} diff --git a/src/batch-box-spout/src/Reader/HeaderStrategy.php b/src/batch-box-spout/src/Reader/HeaderStrategy.php deleted file mode 100644 index c7f3279e..00000000 --- a/src/batch-box-spout/src/Reader/HeaderStrategy.php +++ /dev/null @@ -1,102 +0,0 @@ -|null $headers - */ - private function __construct( - private string $mode, - /** - * @phpstan-var list|null - */ - private ?array $headers - ) { - } - - /** - * Read file has headers but should be skipped. - * - * @phpstan-param list|null $headers - */ - public static function skip(array $headers = null): self - { - return new self(self::SKIP, $headers); - } - - /** - * Read file has headers and should be used to array_combine each row. - */ - public static function combine(): self - { - return new self(self::COMBINE, null); - } - - /** - * Read file has no headers. - * - * @phpstan-param list|null $headers - */ - public static function none(array $headers = null): self - { - return new self(self::NONE, $headers); - } - - /** - * @phpstan-param list $headers - * @internal - */ - public function setHeaders(array $headers): bool - { - if ($this->mode === self::NONE) { - return true; // row should be read, will be considered as an item - } - if ($this->mode === self::COMBINE) { - $this->headers = $headers; - } - - return false; // row should be skipped, will not be considered as an item - } - - /** - * Build the associative item, a combination of headers and values. - * - * @throws InvalidRowSizeException - * - * @phpstan-param array $row - * - * @phpstan-return array - * @internal - */ - public function getItem(array $row): array - { - if ($this->headers === null) { - return $row; // headers were not set, read row as is - } - - try { - /** @phpstan-var array $combined */ - $combined = @array_combine($this->headers, $row); - } catch (\ValueError) { - throw new InvalidRowSizeException($this->headers, $row); - } - - return $combined; - } -} diff --git a/src/batch-box-spout/src/Reader/Options/CSVOptions.php b/src/batch-box-spout/src/Reader/Options/CSVOptions.php deleted file mode 100644 index 32ff2dcf..00000000 --- a/src/batch-box-spout/src/Reader/Options/CSVOptions.php +++ /dev/null @@ -1,42 +0,0 @@ -setFieldDelimiter($this->delimiter); - $reader->setFieldEnclosure($this->enclosure); - $reader->setEncoding($this->encoding); - $reader->setShouldFormatDates($this->formatDates); - $reader->setShouldPreserveEmptyRows($this->preserveEmptyRows); - } - - public function getSheets(ReaderInterface $reader): iterable - { - return $reader->getSheetIterator(); - } -} diff --git a/src/batch-box-spout/src/Reader/Options/ODSOptions.php b/src/batch-box-spout/src/Reader/Options/ODSOptions.php deleted file mode 100644 index 44ea3dc5..00000000 --- a/src/batch-box-spout/src/Reader/Options/ODSOptions.php +++ /dev/null @@ -1,40 +0,0 @@ -sheetFilter = $sheetFilter ?? SheetFilter::all(); - } - - public function configure(ReaderInterface $reader): void - { - if (!$reader instanceof ODSReader) { - throw UnexpectedValueException::type(ODSReader::class, $reader); - } - - $reader->setShouldFormatDates($this->formatDates); - $reader->setShouldPreserveEmptyRows($this->preserveEmptyRows); - } - - public function getSheets(ReaderInterface $reader): iterable - { - yield from $this->sheetFilter->getSheets($reader); - } -} diff --git a/src/batch-box-spout/src/Reader/Options/OptionsInterface.php b/src/batch-box-spout/src/Reader/Options/OptionsInterface.php deleted file mode 100644 index 287d34d9..00000000 --- a/src/batch-box-spout/src/Reader/Options/OptionsInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @internal - */ - public function getSheets(ReaderInterface $reader): iterable; -} diff --git a/src/batch-box-spout/src/Reader/Options/SheetFilter.php b/src/batch-box-spout/src/Reader/Options/SheetFilter.php deleted file mode 100644 index bb837f3a..00000000 --- a/src/batch-box-spout/src/Reader/Options/SheetFilter.php +++ /dev/null @@ -1,73 +0,0 @@ -accept = $accept; - } - - /** - * Will read every sheets in file. - */ - public static function all(): self - { - return new self(fn() => true); - } - - /** - * Will read sheets that are at specified indexes. - */ - public static function indexIs(int $index, int ...$indexes): self - { - $indexes[] = $index; - - return new self(fn(SheetInterface $sheet) => \in_array($sheet->getIndex(), $indexes, true)); - } - - /** - * Will read sheets that are named as specified. - */ - public static function nameIs(string $name, string ...$names): self - { - $names[] = $name; - - return new self(fn(SheetInterface $sheet) => \in_array($sheet->getName(), $names, true)); - } - - /** - * Iterate over valid sheets for the provided filter. - * - * @return Generator&SheetInterface[] - * @phpstan-return Generator - * @internal - */ - public function getSheets(ReaderInterface $reader): Generator - { - /** @var SheetInterface $sheet */ - foreach ($reader->getSheetIterator() as $sheet) { - if (($this->accept)($sheet)) { - yield $sheet; - } - } - } -} diff --git a/src/batch-box-spout/src/Reader/Options/XLSXOptions.php b/src/batch-box-spout/src/Reader/Options/XLSXOptions.php deleted file mode 100644 index 9912ac6f..00000000 --- a/src/batch-box-spout/src/Reader/Options/XLSXOptions.php +++ /dev/null @@ -1,40 +0,0 @@ -sheetFilter = $sheetFilter ?? SheetFilter::all(); - } - - public function configure(ReaderInterface $reader): void - { - if (!$reader instanceof XLSXReader) { - throw UnexpectedValueException::type(XLSXReader::class, $reader); - } - - $reader->setShouldFormatDates($this->formatDates); - $reader->setShouldPreserveEmptyRows($this->preserveEmptyRows); - } - - public function getSheets(ReaderInterface $reader): iterable - { - yield from $this->sheetFilter->getSheets($reader); - } -} diff --git a/src/batch-box-spout/src/Writer/FlatFileWriter.php b/src/batch-box-spout/src/Writer/FlatFileWriter.php deleted file mode 100644 index af352dfb..00000000 --- a/src/batch-box-spout/src/Writer/FlatFileWriter.php +++ /dev/null @@ -1,126 +0,0 @@ -|null - */ - private ?array $headers = null, - ) { - } - - public function initialize(): void - { - /** @var string $path */ - $path = $this->filePath->get($this->jobExecution); - $dir = \dirname($path); - if (!@\is_dir($dir) && !@\mkdir($dir, 0777, true)) { - throw new RuntimeException(\sprintf('Cannot create dir "%s".', $dir)); - } - - $this->writer = WriterFactory::createFromFile($path); - $this->writer->openToFile($path); - $this->options->configure($this->writer); - - if ($this->writer instanceof WriterMultiSheetsAbstract) { - $this->defaultSheet = $this->writer->getCurrentSheet()->getName(); - } - } - - public function write(iterable $items): void - { - $writer = $this->writer; - if ($writer === null) { - throw BadMethodCallException::itemComponentNotInitialized($this); - } - - if (!$this->headersAdded) { - $this->headersAdded = true; - if ($this->headers !== null) { - $writer->addRow(WriterEntityFactory::createRowFromArray($this->headers)); - } - } - - foreach ($items as $row) { - if ($row instanceof WriteToSheetItem) { - $this->changeSheet($row->getSheet()); - $row = $row->getItem(); - } elseif ($this->defaultSheet !== null) { - $this->changeSheet($this->defaultSheet); - } - if (\is_array($row)) { - $row = WriterEntityFactory::createRowFromArray($row); - } - if (!$row instanceof Row) { - throw UnexpectedValueException::type('array|' . Row::class, $row); - } - - $writer->addRow($row); - } - } - - public function flush(): void - { - if ($this->writer === null) { - throw BadMethodCallException::itemComponentNotInitialized($this); - } - - $this->writer->close(); - $this->writer = null; - $this->headersAdded = false; - } - - private function changeSheet(string $name): void - { - if (!$this->writer instanceof WriterMultiSheetsAbstract) { - return; - } - - foreach ($this->writer->getSheets() as $sheet) { - if ($sheet->getName() === $name) { - $this->writer->setCurrentSheet($sheet); - return; - } - } - - $sheet = $this->writer->addNewSheetAndMakeItCurrent(); - $sheet->setName($name); - } -} diff --git a/src/batch-box-spout/src/Writer/Options/CSVOptions.php b/src/batch-box-spout/src/Writer/Options/CSVOptions.php deleted file mode 100644 index fd878686..00000000 --- a/src/batch-box-spout/src/Writer/Options/CSVOptions.php +++ /dev/null @@ -1,33 +0,0 @@ -setFieldDelimiter($this->delimiter); - $writer->setFieldEnclosure($this->enclosure); - $writer->setShouldAddBOM($this->addBOM); - } -} diff --git a/src/batch-box-spout/src/Writer/Options/ODSOptions.php b/src/batch-box-spout/src/Writer/Options/ODSOptions.php deleted file mode 100644 index d2fab9f4..00000000 --- a/src/batch-box-spout/src/Writer/Options/ODSOptions.php +++ /dev/null @@ -1,36 +0,0 @@ -sheet) { - $writer->getCurrentSheet()->setName($this->sheet); - } - if ($this->style) { - $writer->setDefaultRowStyle($this->style); - } - } -} diff --git a/src/batch-box-spout/src/Writer/Options/OptionsInterface.php b/src/batch-box-spout/src/Writer/Options/OptionsInterface.php deleted file mode 100644 index 37591e1e..00000000 --- a/src/batch-box-spout/src/Writer/Options/OptionsInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -sheet) { - $writer->getCurrentSheet()->setName($this->sheet); - } - if ($this->style) { - $writer->setDefaultRowStyle($this->style); - } - } -} diff --git a/src/batch-box-spout/src/Writer/WriteToSheetItem.php b/src/batch-box-spout/src/Writer/WriteToSheetItem.php deleted file mode 100644 index 5c312dac..00000000 --- a/src/batch-box-spout/src/Writer/WriteToSheetItem.php +++ /dev/null @@ -1,50 +0,0 @@ - $item - */ - public static function array(string $sheet, array $item, Style $style = null): self - { - return new self($sheet, WriterEntityFactory::createRowFromArray($item, $style)); - } - - /** - * Static constructor from {@see Row} object. - */ - public static function row(string $sheet, Row $item): self - { - return new self($sheet, $item); - } - - public function getSheet(): string - { - return $this->sheet; - } - - public function getItem(): Row - { - return $this->item; - } -} diff --git a/src/batch-box-spout/tests/Reader/FlatFileReaderTest.php b/src/batch-box-spout/tests/Reader/FlatFileReaderTest.php deleted file mode 100644 index 0eb52170..00000000 --- a/src/batch-box-spout/tests/Reader/FlatFileReaderTest.php +++ /dev/null @@ -1,302 +0,0 @@ -setJobExecution($jobExecution); - - /** @var \Iterator $got */ - $got = $reader->read(); - self::assertInstanceOf(\Iterator::class, $got); - self::assertSame($expected, iterator_to_array($got)); - } - - public function sets(): Generator - { - $csv = __DIR__ . '/fixtures/sample.csv'; - $ods = __DIR__ . '/fixtures/sample.ods'; - $xlsx = __DIR__ . '/fixtures/sample.xlsx'; - - // first line is not header - $expected = [ - ['firstName', 'lastName'], - ['John', 'Doe'], - ['Jane', 'Doe'], - ['Jack', 'Doe'], - ]; - yield [ - $csv, - fn() => new CSVOptions(), - fn() => HeaderStrategy::none(), - $expected, - ]; - yield [ - $ods, - fn() => new ODSOptions(), - fn() => HeaderStrategy::none(), - $expected, - ]; - yield [ - $xlsx, - fn() => new XLSXOptions(), - fn() => HeaderStrategy::none(), - $expected, - ]; - - // first line is header and should be skipped - $expected = [ - ['John', 'Doe'], - ['Jane', 'Doe'], - ['Jack', 'Doe'], - ]; - yield [ - $csv, - fn() => new CSVOptions(), - fn() => HeaderStrategy::skip(), - $expected, - ]; - yield [ - $ods, - fn() => new ODSOptions(), - fn() => HeaderStrategy::skip(), - $expected, - ]; - yield [ - $xlsx, - fn() => new XLSXOptions(), - fn() => HeaderStrategy::skip(), - $expected, - ]; - - // first line is header and should be skipped, but headers is provided with static value - $expected = [ - ['prenom' => 'John', 'nom' => 'Doe'], - ['prenom' => 'Jane', 'nom' => 'Doe'], - ['prenom' => 'Jack', 'nom' => 'Doe'], - ]; - yield [ - $csv, - fn() => new CSVOptions(), - fn() => HeaderStrategy::skip(['prenom', 'nom']), - $expected, - ]; - yield [ - $ods, - fn() => new ODSOptions(), - fn() => HeaderStrategy::skip(['prenom', 'nom']), - $expected, - ]; - yield [ - $xlsx, - fn() => new XLSXOptions(), - fn() => HeaderStrategy::skip(['prenom', 'nom']), - $expected, - ]; - - // first line is header and should be skipped - $expected = [ - ['firstName' => 'John', 'lastName' => 'Doe'], - ['firstName' => 'Jane', 'lastName' => 'Doe'], - ['firstName' => 'Jack', 'lastName' => 'Doe'], - ]; - yield [ - $csv, - fn() => new CSVOptions(), - fn() => HeaderStrategy::combine(), - $expected, - ]; - yield [ - $ods, - fn() => new ODSOptions(), - fn() => HeaderStrategy::combine(), - $expected, - ]; - yield [ - $xlsx, - fn() => new XLSXOptions(), - fn() => HeaderStrategy::combine(), - $expected, - ]; - - // non-standard CSV (delimiter and enclosure changed) encoded in ISO-8859 - yield [ - __DIR__ . '/fixtures/iso-8859-1.csv', - fn() => new CSVOptions(';', '|', 'ISO-8859-1'), - fn() => HeaderStrategy::none(), - [ - ['Gérard', 'À peu près'], - ['Benoît', 'Bien-être'], - ['Gaëlle', 'Ça va'], - ], - ]; - - // multi-tab files, 1st tab - $expected = [ - ['firstName' => 'John', 'lastName' => 'Doe'], - ['firstName' => 'Jane', 'lastName' => 'Doe'], - ['firstName' => 'Jack', 'lastName' => 'Doe'], - ]; - yield [ - __DIR__ . '/fixtures/multi-tabs.ods', - fn() => new ODSOptions(SheetFilter::indexIs(0)), - fn() => HeaderStrategy::combine(), - $expected, - ]; - yield [ - __DIR__ . '/fixtures/multi-tabs.xlsx', - fn() => new XLSXOptions(SheetFilter::indexIs(0)), - fn() => HeaderStrategy::combine(), - $expected, - ]; - - // multi-tab files, tab "Français" - $expected = [ - ['prénom' => 'Jean', 'nom' => 'Bon'], - ['prénom' => 'Jeanne', 'nom' => 'Aimar'], - ['prénom' => 'Jacques', 'nom' => 'Ouzi'], - ]; - yield [ - __DIR__ . '/fixtures/multi-tabs.ods', - fn() => new ODSOptions(SheetFilter::nameIs('Français')), - fn() => HeaderStrategy::combine(), - $expected, - ]; - yield [ - __DIR__ . '/fixtures/multi-tabs.xlsx', - fn() => new XLSXOptions(SheetFilter::nameIs('Français')), - fn() => HeaderStrategy::combine(), - $expected, - ]; - - // multi-tab files, all tabs - $expected = [ - ['firstName' => 'John', 'lastName' => 'Doe'], - ['firstName' => 'Jane', 'lastName' => 'Doe'], - ['firstName' => 'Jack', 'lastName' => 'Doe'], - ['prénom' => 'Jean', 'nom' => 'Bon'], - ['prénom' => 'Jeanne', 'nom' => 'Aimar'], - ['prénom' => 'Jacques', 'nom' => 'Ouzi'], - ]; - yield [ - __DIR__ . '/fixtures/multi-tabs.ods', - fn() => new ODSOptions(), - fn() => HeaderStrategy::combine(), - $expected, - ]; - yield [ - __DIR__ . '/fixtures/multi-tabs.xlsx', - fn() => new XLSXOptions(), - fn() => HeaderStrategy::combine(), - $expected, - ]; - } - - public function testReadWrongLineSize(): void - { - $file = __DIR__ . '/fixtures/wrong-line-size.csv'; - $jobExecution = JobExecution::createRoot('123456789', 'parent'); - $reader = new FlatFileReader( - new StaticValueParameterAccessor($file), - new CSVOptions(), - HeaderStrategy::combine() - ); - $reader->setJobExecution($jobExecution); - - /** @var \Iterator $result */ - $result = $reader->read(); - self::assertInstanceOf(\Iterator::class, $result); - self::assertSame( - [ - ['firstName' => 'John', 'lastName' => 'Doe'], - ['firstName' => 'Jack', 'lastName' => 'Doe'], - ], - iterator_to_array($result) - ); - - self::assertSame( - 'Expecting row {row} to have exactly {expected} columns(s), but got {actual}.', - $jobExecution->getWarnings()[0]->getMessage() - ); - self::assertSame( - [ - '{row}' => '3', - '{expected}' => '2', - '{actual}' => '3', - ], - $jobExecution->getWarnings()[0]->getParameters() - ); - self::assertSame( - ['headers' => ['firstName', 'lastName'], 'row' => ['Jane', 'Doe', 'too much data']], - $jobExecution->getWarnings()[0]->getContext() - ); - } - - /** - * @dataProvider wrongOptions - */ - public function testWrongOptions(string $file, callable $options): void - { - $this->expectException(UnexpectedValueException::class); - - $jobExecution = JobExecution::createRoot('123456789', 'parent'); - $reader = new FlatFileReader(new StaticValueParameterAccessor($file), $options()); - $reader->setJobExecution($jobExecution); - - iterator_to_array($reader->read()); - } - - public function wrongOptions(): \Generator - { - // with CSV file, CSVOptions is expected - yield [ - __DIR__ . '/fixtures/sample.csv', - fn() => new XLSXOptions(), - ]; - yield [ - __DIR__ . '/fixtures/sample.csv', - fn() => new ODSOptions(), - ]; - - // with ODS file, ODSOptions is expected - yield [ - __DIR__ . '/fixtures/sample.ods', - fn() => new CSVOptions(), - ]; - yield [ - __DIR__ . '/fixtures/sample.ods', - fn() => new XLSXOptions(), - ]; - - // with XLSX file, XLSXOptions is expected - yield [ - __DIR__ . '/fixtures/sample.xlsx', - fn() => new CSVOptions(), - ]; - yield [ - __DIR__ . '/fixtures/sample.xlsx', - fn() => new ODSOptions(), - ]; - } -} diff --git a/src/batch-box-spout/tests/Reader/fixtures/iso-8859-1.csv b/src/batch-box-spout/tests/Reader/fixtures/iso-8859-1.csv deleted file mode 100644 index df0df07c..00000000 --- a/src/batch-box-spout/tests/Reader/fixtures/iso-8859-1.csv +++ /dev/null @@ -1,3 +0,0 @@ -|Gérard|;|À peu près| -|Benoît|;|Bien-être| -|Gaëlle|;|Ça va| diff --git a/src/batch-box-spout/tests/Reader/fixtures/multi-tabs.ods b/src/batch-box-spout/tests/Reader/fixtures/multi-tabs.ods deleted file mode 100644 index 1ba774d4c9816248fb22ef32c0ea67547220c4d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8777 zcmdT~WmuG5w*~H!~tm#5R{VcZjh7~q#MMbLzG7P!22CP z^*#EY^Zh()u079w=GyDtYuCEgUiWAyBOwzaAOH{$o|3*M>`7;%nkzPbO&22*yO0=BlZadZ6(4a&m_gFqb3L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lr3p|4WbfGs^XL3*G~t|3y9Eu6XRXMWAkfKm7k$?au($0s5Z-EKuqAAM~NAijCTA RG&BO#)rTrb1e8~I{{nV(yH5ZB diff --git a/src/batch-box-spout/tests/Reader/fixtures/sample.csv b/src/batch-box-spout/tests/Reader/fixtures/sample.csv deleted file mode 100644 index 08eff973..00000000 --- a/src/batch-box-spout/tests/Reader/fixtures/sample.csv +++ /dev/null @@ -1,4 +0,0 @@ -firstName,lastName -John,Doe -Jane,Doe -Jack,Doe diff --git a/src/batch-box-spout/tests/Reader/fixtures/sample.ods b/src/batch-box-spout/tests/Reader/fixtures/sample.ods deleted file mode 100644 index 80ae1907a549a99b3ec730607d29d2059df2528d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7842 zcmds6cQ{<#`W*=(N}@${i4uk|g6PqP(R+(-Fgi2L=slu`=pqHtqjw@oh+c;1okSNk zY9#oL?>^s6xykq3`|t0a=R9XmS!?fk&pvCvXKgjbi`e7<03HBvTb@BV$X+O%3jhF| zADE8-4mJ)jlm`L^MIh{L%%Lb7xFg8b(Si#OMcN>_;0Tzb1>D@l0p^I}LL!`DPz$6r z42Dwsi4*)`!F%E&0C0X#VmP&|T^!6Dp*HqN5bEzH7sAmhOie|W2%j1s^AjR@IcW{d zc^q?`;bCw9#e_gO=A^5pq$P9v_H8~sJ`oWSFc_?)q@<;#WoT$0y}i8y z0|O%>BI4rWo1*0B})EURqMiePUz0+wqeiq5lW|VWWo5DvPkKv$TwZ3M+n>JLM7K;{N^}AC@k{ zVqJ|Fs(p=_L0%^l3Hila&HBfOUcHPS*vT9w+#q%N^4Xx_M%^5adacrn9c!Ox(W5I5 zI6*)aMWoo1gHZOokLfn4LglSTLPFK|mdNYJ-qjB8-H6LJ?TT9}2rg*tk$Kc&79o;d zeMsP-r{(QznyD(PB&Wer!kgVCPTQ1PH( zR^H@Y*;!aGWm3dlhO+8i_lf7N_N}<1Q`8YkZP)@dP7c%H#v|ZvCxotE6)E>@y*T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XN1V%UBtvlSt15K%svw2ooHaT_KS~EDf@~U#J96osl4cxrHRyA^ zr1kz@{ajt?ixqW{&`U49D5)-2c8;~1QVQV|^N;M-%5@W2+&Dtt#~KAA8RN@xkN85K zK2~G4GP)x`UJ~qFDu5~`=e>0Txx-!soRbmbM~UN0)2_w#z-oWcWL@J8n{d1?S!yD^ zkN+|-D9QbK)-*xGJoc?XJlzt?0qgtQYEiy7-}9$JLU(^uTZ84W<>-sB*~Gss`2&@T z?yM@4_b&}RI680cDVGkZ3?Mdps`0>kQ)b~!cqL1Rg-;~1G4R4|MPh-`pS8Cuu#`v^ zMD|?fEr&%_gz@&&GJ-7qo=ejv{40rnM9|N!SNkkx%v>5H`u57u`PuPms75&F7|{#zvf HeB}QCAl}(W diff --git a/src/batch-box-spout/tests/Reader/fixtures/wrong-line-size.csv b/src/batch-box-spout/tests/Reader/fixtures/wrong-line-size.csv deleted file mode 100644 index c5985ddc..00000000 --- a/src/batch-box-spout/tests/Reader/fixtures/wrong-line-size.csv +++ /dev/null @@ -1,4 +0,0 @@ -firstName,lastName -John,Doe -Jane,Doe,too much data -Jack,Doe diff --git a/src/batch-box-spout/tests/Writer/FlatFileWriterTest.php b/src/batch-box-spout/tests/Writer/FlatFileWriterTest.php deleted file mode 100644 index 0ad596e6..00000000 --- a/src/batch-box-spout/tests/Writer/FlatFileWriterTest.php +++ /dev/null @@ -1,392 +0,0 @@ -setJobExecution(JobExecution::createRoot('123456789', 'export')); - - $writer->initialize(); - $writer->write($itemsToWrite); - $writer->flush(); - - self::assertFileContents($file, $expectedContent); - } - - public function sets(): \Generator - { - $headers = ['firstName', 'lastName']; - $items = [ - ['John', 'Doe'], - ['Jane', 'Doe'], - ['Jack', 'Doe'], - ]; - $contentWithoutHeader = <<types() as [$type, $options]) { - yield [ - "no-header.$type", - $options, - null, - $items, - $contentWithoutHeader, - ]; - yield [ - "with-header.$type", - $options, - $headers, - $items, - $contentWithHeader, - ]; - } - - $content = << new CSVOptions(';', '|'), - null, - $items, - $content, - ]; - - $style = (new StyleBuilder()) - ->setFontBold() - ->setFontSize(15) - ->setFontColor(Color::BLUE) - ->setShouldWrapText() - ->setCellAlignment(CellAlignment::RIGHT) - ->setBackgroundColor(Color::YELLOW) - ->build(); - - yield [ - "total-style.xlsx", - fn() => new XLSXOptions('Sheet1 with styles', $style), - null, - $items, - $contentWithoutHeader, - ]; - yield [ - "total-style.ods", - fn() => new ODSOptions('Sheet1 with styles', $style), - null, - $items, - $contentWithoutHeader, - ]; - - $blue = (new StyleBuilder()) - ->setFontBold() - ->setFontColor(Color::BLUE) - ->build(); - $red = (new StyleBuilder()) - ->setFontBold() - ->setFontColor(Color::RED) - ->build(); - $green = (new StyleBuilder()) - ->setFontBold() - ->setFontColor(Color::GREEN) - ->build(); - $styledItems = [ - WriterEntityFactory::createRowFromArray(['John', 'Doe'], $blue), - WriterEntityFactory::createRowFromArray(['Jane', 'Doe'], $red), - WriterEntityFactory::createRowFromArray(['Jack', 'Doe'], $green), - ]; - yield [ - "partial-style.xlsx", - fn() => new XLSXOptions(), - null, - $styledItems, - $contentWithoutHeader, - ]; - yield [ - "partial-style.ods", - fn() => new ODSOptions(), - null, - $styledItems, - $contentWithoutHeader, - ]; - } - - /** - * @dataProvider types - */ - public function testWriteInvalidItem(string $type, callable $options): void - { - $this->expectException(UnexpectedValueException::class); - - $file = self::WRITE_DIR . '/invalid-item.' . $type; - $writer = new FlatFileWriter(new StaticValueParameterAccessor($file), $options()); - $writer->setJobExecution(JobExecution::createRoot('123456789', 'export')); - - $writer->initialize(); - $writer->write([true]); // writer accept collection of array or \Box\Spout\Common\Entity\Row - } - - /** - * @dataProvider types - */ - public function testCannotCreateFile(string $type, callable $options): void - { - $this->expectException(RuntimeException::class); - - $file = '/path/to/a/dir/that/do/not/exists/and/not/creatable/file.' . $type; - $writer = new FlatFileWriter(new StaticValueParameterAccessor($file), $options()); - $writer->setJobExecution(JobExecution::createRoot('123456789', 'export')); - - $writer->initialize(); - } - - /** - * @dataProvider types - */ - public function testShouldInitializeBeforeWrite(string $type, callable $options): void - { - $this->expectException(BadMethodCallException::class); - - $file = self::WRITE_DIR . '/should-initialize-before-write.' . $type; - $writer = new FlatFileWriter(new StaticValueParameterAccessor($file), $options()); - $writer->write([true]); - } - - /** - * @dataProvider types - */ - public function testShouldInitializeBeforeFlush(string $type, callable $options): void - { - $this->expectException(BadMethodCallException::class); - - $file = self::WRITE_DIR . '/should-initialize-before-flush.' . $type; - $writer = new FlatFileWriter(new StaticValueParameterAccessor($file), $options()); - $writer->flush(); - } - - public function types(): \Generator - { - $types = [ - 'csv' => fn() => new CSVOptions(), - 'xlsx' => fn() => new XLSXOptions(), - 'ods' => fn() => new ODSOptions(), - ]; - foreach ($types as $type => $options) { - yield [$type, $options]; - } - } - - /** - * @dataProvider multipleSheetsOptions - */ - public function testWriteMultipleSheets(string $type, callable $options): void - { - $file = self::WRITE_DIR . '/multiple-sheets.' . $type; - self::assertFileDoesNotExist($file); - - $writer = new FlatFileWriter(new StaticValueParameterAccessor($file), $options()); - $writer->setJobExecution(JobExecution::createRoot('123456789', 'export')); - - $writer->initialize(); - $writer->write([ - WriteToSheetItem::array('English', ['John', 'Doe']), - WriteToSheetItem::array('Français', ['Jean', 'Aimar']), - WriteToSheetItem::row('English', WriterEntityFactory::createRowFromArray(['Jack', 'Doe'])), - WriteToSheetItem::row('Français', WriterEntityFactory::createRowFromArray(['Jacques', 'Ouzi'])), - ]); - $writer->flush(); - - if ($type === 'csv') { - self::assertFileContents($file, << fn() => new CSVOptions(), - 'xlsx' => fn() => new XLSXOptions('English'), - 'ods' => fn() => new ODSOptions('English'), - ]; - foreach ($types as $type => $options) { - yield [$type, $options]; - } - } - - /** - * @dataProvider wrongOptions - */ - public function testWrongOptions(string $type, callable $options): void - { - $this->expectException(UnexpectedValueException::class); - - $file = self::WRITE_DIR . '/should-initialize-before-flush.' . $type; - $jobExecution = JobExecution::createRoot('123456789', 'parent'); - $reader = new FlatFileWriter(new StaticValueParameterAccessor($file), $options()); - $reader->setJobExecution($jobExecution); - $reader->initialize(); - } - - public function wrongOptions(): \Generator - { - // with CSV file, CSVOptions is expected - yield [ - 'csv', - fn() => new XLSXOptions(), - ]; - yield [ - 'csv', - fn() => new ODSOptions(), - ]; - - // with ODS file, ODSOptions is expected - yield [ - 'ods', - fn() => new CSVOptions(), - ]; - yield [ - 'ods', - fn() => new XLSXOptions(), - ]; - - // with XLSX file, XLSXOptions is expected - yield [ - 'xlsx', - fn() => new CSVOptions(), - ]; - yield [ - 'xlsx', - fn() => new ODSOptions(), - ]; - } - - private static function assertFileContents(string $filePath, string $inlineData): void - { - $type = \strtolower(\pathinfo($filePath, PATHINFO_EXTENSION)); - $strings = array_merge(...array_map('str_getcsv', explode(PHP_EOL, $inlineData))); - - switch ($type) { - case 'csv': - $fileContents = file_get_contents($filePath); - foreach ($strings as $string) { - self::assertStringContainsString($string, $fileContents); - } - break; - - case 'xlsx': - $pathToSheetFile = $filePath . '#xl/worksheets/sheet1.xml'; - $xmlContents = file_get_contents('zip://' . $pathToSheetFile); - foreach ($strings as $string) { - self::assertStringContainsString("$string", $xmlContents); - } - break; - - case 'ods': - $sheetContent = file_get_contents('zip://' . $filePath . '#content.xml'); - if (!preg_match('#]+>[\s\S]*?<\/table:table>#', $sheetContent, $matches)) { - self::fail('No sheet found in file "' . $filePath . '".'); - } - $sheetXmlAsString = $matches[0]; - foreach ($strings as $string) { - self::assertStringContainsString("$string", $sheetXmlAsString); - } - break; - } - } - - private static function assertSheetContents(string $filePath, string $sheet, string $inlineData): void - { - $type = \strtolower(\pathinfo($filePath, PATHINFO_EXTENSION)); - $strings = array_merge(...array_map('str_getcsv', explode(PHP_EOL, $inlineData))); - - switch ($type) { - case 'csv': - $fileContents = file_get_contents($filePath); - foreach ($strings as $string) { - self::assertStringContainsString($string, $fileContents); - } - break; - - case 'xlsx': - $workbookContent = file_get_contents('zip://' . $filePath . '#xl/workbook.xml'); - if (!preg_match('#$string", $sheetContent); - } - break; - - case 'ods': - $sheetContent = file_get_contents('zip://' . $filePath . '#content.xml'); - $regex = '#[\s\S]*?<\/table:table>#'; - if (!preg_match($regex, $sheetContent, $matches)) { - self::fail('Sheet ' . $sheet . ' was not found in file "' . $filePath . '".'); - } - $sheetXmlAsString = $matches[0]; - foreach ($strings as $string) { - self::assertStringContainsString("$string", $sheetXmlAsString); - } - break; - } - } -} diff --git a/src/batch-box-spout/tests/bootstrap.php b/src/batch-box-spout/tests/bootstrap.php deleted file mode 100644 index 6dc2ab0c..00000000 --- a/src/batch-box-spout/tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ -remove($artifactDir); -} - -(new Filesystem())->mkdir($artifactDir); - -define('ARTIFACT_DIR', $artifactDir); diff --git a/src/batch-doctrine-dbal/src/DoctrineDBALJobExecutionStorage.php b/src/batch-doctrine-dbal/src/DoctrineDBALJobExecutionStorage.php index 7f0dda63..15bfae20 100644 --- a/src/batch-doctrine-dbal/src/DoctrineDBALJobExecutionStorage.php +++ b/src/batch-doctrine-dbal/src/DoctrineDBALJobExecutionStorage.php @@ -93,24 +93,6 @@ public function setup(): void $this->connection->getConfiguration()->setSchemaAssetsFilter($assetFilter); } - /** - * Create required table for this storage. - * @deprecated - */ - public function createSchema(): void - { - @\trigger_error( - \sprintf( - 'Since yokai/batch-doctrine-dbal 0.5.8: ' . - 'Method "%s()" is deprecated and will be removed in 0.6.0. Use %s::setup() instead.', - __METHOD__, - __CLASS__, - ), - \E_USER_DEPRECATED, - ); - $this->setup(); - } - public function store(JobExecution $execution): void { try { diff --git a/src/batch-doctrine-dbal/tests/DoctrineDBALJobExecutionStorageTest.php b/src/batch-doctrine-dbal/tests/DoctrineDBALJobExecutionStorageTest.php index 546a4a8f..5a2ecd26 100644 --- a/src/batch-doctrine-dbal/tests/DoctrineDBALJobExecutionStorageTest.php +++ b/src/batch-doctrine-dbal/tests/DoctrineDBALJobExecutionStorageTest.php @@ -359,14 +359,6 @@ public function queries(): Generator ]; } - public function testCreateSchemaDeprecated(): void - { - $schemaManager = $this->connection->createSchemaManager(); - self::assertFalse($schemaManager->tablesExist(['yokai_batch_job_execution'])); - $this->createStorage()->createSchema(); - self::assertTrue($schemaManager->tablesExist(['yokai_batch_job_execution'])); - } - public static function assertExecutionIds(array $ids, iterable $executions): void { $actualIds = []; diff --git a/src/batch/README.md b/src/batch/README.md index 1f13ddff..83e20e6e 100644 --- a/src/batch/README.md +++ b/src/batch/README.md @@ -43,7 +43,6 @@ Looking for something more specific ? - [Read from Doctrine ORM entities](https://github.com/yokai-php/batch-doctrine-orm) - [Write to Doctrine ORM/ODM... objects](https://github.com/yokai-php/batch-doctrine-persistence) - [Copy/Move files in a job / Trigger job when file found](https://github.com/yokai-php/batch-league-flysystem) -- [Read/Write from/to CSV/ODS/XLSX](https://github.com/yokai-php/batch-box-spout) - [Trigger async jobs using CLI command](https://github.com/yokai-php/batch-symfony-console): - [Integration with Symfony framework](https://github.com/yokai-php/batch-symfony-framework) - [Trigger async jobs using using queue](https://github.com/yokai-php/batch-symfony-messenger): diff --git a/src/batch/composer.json b/src/batch/composer.json index 6acced65..a0dcc1ee 100644 --- a/src/batch/composer.json +++ b/src/batch/composer.json @@ -32,7 +32,6 @@ } }, "suggest": { - "yokai/batch-box-spout": "Read/Write from/to CSV/ODS/XLSX", "yokai/batch-doctrine-dbal": "Store jobs executions in a relational database", "yokai/batch-doctrine-orm": "Read from Doctrine ORM entities", "yokai/batch-doctrine-persistence": "Write to Doctrine objects to managers", diff --git a/src/batch/docs/domain/item-job/item-reader.md b/src/batch/docs/domain/item-job/item-reader.md index fe20c720..dd161fd2 100644 --- a/src/batch/docs/domain/item-job/item-reader.md +++ b/src/batch/docs/domain/item-job/item-reader.md @@ -23,8 +23,6 @@ It can be any class implementing [ItemReaderInterface](../../../src/Job/Item/Ite read from an iterable you provide during construction. **Item readers from bridges:** -- `DEPRECATED` [FlatFileReader (`box/spout`)](https://github.com/yokai-php/batch-box-spout/blob/0.x/src/Reader/FlatFileReader.php): - read from any CSV/ODS/XLSX file. - [FlatFileReader (`openspout/openspout`)](https://github.com/yokai-php/batch-openspout/blob/0.x/src/Reader/FlatFileReader.php): read from any CSV/ODS/XLSX file. - [DoctrineDBALQueryOffsetReader (`doctrine/dbal`)](https://github.com/yokai-php/batch-doctrine-dbal/blob/0.x/src/DoctrineDBALQueryOffsetReader.php): diff --git a/src/batch/docs/domain/item-job/item-writer.md b/src/batch/docs/domain/item-job/item-writer.md index 74709f8b..58006f12 100644 --- a/src/batch/docs/domain/item-job/item-writer.md +++ b/src/batch/docs/domain/item-job/item-writer.md @@ -37,8 +37,6 @@ It can be any class implementing [ItemWriterInterface](../../../src/Job/Item/Ite write items by inserting/updating in a table via a Doctrine `Connection`. - [ObjectWriter (`doctrine/persistence`)](https://github.com/yokai-php/batch-doctrine-persistence/blob/0.x/src/ObjectWriter.php): write items to any Doctrine `ObjectManager`. -- `DEPRECATED` [FlatFileWriter (`box/spout`)](https://github.com/yokai-php/batch-box-spout/blob/0.x/src/Writer/FlatFileWriter.php): - write items to any CSV/ODS/XLSX file. - [FlatFileWriter (`openspout/openspout`)](https://github.com/yokai-php/batch-openspout/blob/0.x/src/Writer/FlatFileWriter.php): write items to any CSV/ODS/XLSX file.