-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Centralize documentation in the source repository (#124)
Co-authored-by: Maximilien <[email protected]>
- Loading branch information
Showing
44 changed files
with
219 additions
and
219 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/batch-symfony-console/docs/command.md → docs/batch-symfony-console/command.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# What is an item processor ? | ||
|
||
The item processor is used by the item job to transform every read item. | ||
|
||
It can be any class implementing [ItemProcessorInterface](../../../../src/batch/src/Job/Item/ItemProcessorInterface.php). | ||
|
||
## What types of item processors exists ? | ||
|
||
**Built-in item processors:** | ||
- [ArrayMapProcessor](../../../../src/batch/src/Job/Item/Processor/ArrayMapProcessor.php): | ||
apply a callback to each element of array items. | ||
- [CallbackProcessor](../../../../src/batch/src/Job/Item/Processor/CallbackProcessor.php): | ||
use a callback to transform each items. | ||
- [ChainProcessor](../../../../src/batch/src/Job/Item/Processor/ChainProcessor.php): | ||
chain transformation of multiple item processor, one after the other. | ||
- [FilterUniqueProcessor](../../../../src/batch/src/Job/Item/Processor/FilterUniqueProcessor.php): | ||
assign an identifier to each item, and skip already encountered items. | ||
- [NullProcessor](../../../../src/batch/src/Job/Item/Processor/NullProcessor.php): | ||
perform no transformation on items. | ||
- [RoutingProcessor](../../../../src/batch/src/Job/Item/Processor/RoutingProcessor.php): | ||
route processing to different processor based on your logic. | ||
|
||
**Item processors from bridges:** | ||
- [SkipInvalidItemProcessor (`symfony/validator`)](../../../../src/batch-symfony-validator/src/SkipInvalidItemProcessor.php): | ||
validate item and throw exception if invalid that will cause item to be skipped. | ||
- [DenormalizeItemProcessor (`symfony/serializer`)](../../../../src/batch-symfony-serializer/src/DenormalizeItemProcessor.php): | ||
denormalize each item. | ||
- [NormalizeItemProcessor (`symfony/serializer`)](../../../../src/batch-symfony-serializer/src/NormalizeItemProcessor.php): | ||
normalize each item. | ||
|
||
**Item processors for testing purpose:** | ||
- [TestDebugProcessor](../../../../src/batch/src/Test/Job/Item/Processor/TestDebugProcessor.php): | ||
dummy item processor that you can use in your unit tests. | ||
|
||
## On the same subject | ||
|
||
- [What is an item job ?](../item-job.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# What is an item reader ? | ||
|
||
The item reader is used by the item job to extract item from a source. | ||
|
||
It can be any class implementing [ItemReaderInterface](../../../../src/batch/src/Job/Item/ItemReaderInterface.php). | ||
|
||
## What types of item readers exists ? | ||
|
||
**Built-in item readers:** | ||
- [FixedColumnSizeFileReader](../../../../src/batch/src/Job/Item/Reader/Filesystem/FixedColumnSizeFileReader.php): | ||
read a file line by line, and decode each line with fixed columns size to an array. | ||
- [JsonLinesReader](../../../../src/batch/src/Job/Item/Reader/Filesystem/JsonLinesReader.php): | ||
read a file line by line, and decode each line as JSON. | ||
- [AddMetadataReader](../../../../src/batch/src/Job/Item/Reader/AddMetadataReader.php): | ||
decorates another reader by adding static information to each read item. | ||
- [IndexWithReader](../../../../src/batch/src/Job/Item/Reader/IndexWithReader.php): | ||
decorates another reader by changing index of each item. | ||
- [ParameterAccessorReader](../../../../src/batch/src/Job/Item/Reader/ParameterAccessorReader.php): | ||
read from an inmemory value located at some configurable place. | ||
- [SequenceReader](../../../../src/batch/src/Job/Item/Reader/SequenceReader.php): | ||
read from multiple item reader, one after the other. | ||
- [StaticIterableReader](../../../../src/batch/src/Job/Item/Reader/StaticIterableReader.php): | ||
read from an iterable you provide during construction. | ||
- [CallbackReader](../../../../src/batch/src/Job/Item/Reader/CallbackReader.php): | ||
read from a `Closure` you provide during construction. | ||
|
||
**Item readers from bridges:** | ||
- [FlatFileReader (`openspout/openspout`)](../../../../src/batch-openspout/src/Reader/FlatFileReader.php): | ||
read from any CSV/ODS/XLSX file. | ||
- [DoctrineDBALQueryOffsetReader (`doctrine/dbal`)](../../../../src/batch-doctrine-dbal/src/DoctrineDBALQueryOffsetReader.php): | ||
read execute an SQL query and iterate over results, using a limit + offset pagination strategy. | ||
- [DoctrineDBALQueryCursorReader (`doctrine/dbal`)](../../../../src/batch-doctrine-dbal/src/DoctrineDBALQueryCursorReader.php): | ||
read execute an SQL query and iterate over results, using a column based cursor strategy. | ||
- [EntityReader (`doctrine/orm`)](../../../../src/batch-doctrine-orm/src/EntityReader.php): | ||
read from any Doctrine ORM entity. | ||
|
||
**Item readers for testing purpose:** | ||
- [TestDebugReader](../../../../src/batch/src/Test/Job/Item/Reader/TestDebugReader.php): | ||
dummy item reader that you can use in your unit tests. | ||
|
||
## On the same subject | ||
|
||
- [What is an item job ?](../item-job.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# What is an item writer ? | ||
|
||
The item writer is used by the item job to load every processed item. | ||
|
||
It can be any class implementing [ItemWriterInterface](../../../../src/batch/src/Job/Item/ItemWriterInterface.php). | ||
|
||
## What types of item writers exists ? | ||
|
||
**Built-in item writers:** | ||
- [JsonLinesWriter](../../../../src/batch/src/Job/Item/Writer/Filesystem/JsonLinesWriter.php): | ||
write items as a json string each on a line of a file. | ||
- [ChainWriter](../../../../src/batch/src/Job/Item/Writer/ChainWriter.php): | ||
write items on multiple item writers. | ||
- [ConditionalWriter](../../../../src/batch/src/Job/Item/Writer/ConditionalWriter.php): | ||
will only write items that are matching your conditions. | ||
- [DispatchEventsWriter](../../../../src/batch/src/Job/Item/Writer/DispatchEventsWriter.php): | ||
will dispatch events before and after writing. | ||
- [LaunchJobForEachItemWriter](../../../../src/batch/src/Job/Item/Writer/LaunchJobForEachItemWriter.php): | ||
launch another job for each items. | ||
- [LaunchJobForItemsBatchWriter](../../../../src/batch/src/Job/Item/Writer/LaunchJobForItemsBatchWriter.php): | ||
launch another job for each item batches. | ||
- [NullWriter](../../../../src/batch/src/Job/Item/Writer/NullWriter.php): | ||
do not write items. | ||
- [RoutingWriter](../../../../src/batch/src/Job/Item/Writer/RoutingWriter.php): | ||
route writing to different writer based on your logic. | ||
- [SummaryWriter](../../../../src/batch/src/Job/Item/Writer/SummaryWriter.php): | ||
write items to a job summary value. | ||
- [TransformingWriter](../../../../src/batch/src/Job/Item/Writer/TransformingWriter.php): | ||
perform items transformation before delegating to another writer. | ||
- [CallbackWriter](../../../../src/batch/src/Job/Item/Writer/CallbackWriter.php): | ||
delegate items write operations to a closure passed at construction. | ||
|
||
**Item writers from bridges:** | ||
- [DispatchEachItemAsMessageWriter (`symfony/messenger`)](../../../../src/batch-symfony-messenger/src/Writer/DispatchEachItemAsMessageWriter.php): | ||
dispatch each item as a message in a bus. | ||
- [DoctrineDBALInsertWriter (`doctrine/dbal`)](../../../../src/batch-doctrine-dbal/src/DoctrineDBALInsertWriter.php): | ||
write items by inserting in a table via a Doctrine `Connection`. | ||
- [DoctrineDBALUpsertWriter (`doctrine/dbal`)](../../../../src/batch-doctrine-dbal/src/DoctrineDBALUpsertWriter.php): | ||
write items by inserting/updating in a table via a Doctrine `Connection`. | ||
- [ObjectWriter (`doctrine/persistence`)](../../../../src/batch-doctrine-persistence/src/ObjectWriter.php): | ||
write items to any Doctrine `ObjectManager`. | ||
- [FlatFileWriter (`openspout/openspout`)](../../../../src/batch-openspout/src/Writer/FlatFileWriter.php): | ||
write items to any CSV/ODS/XLSX file. | ||
|
||
**Item writers for testing purpose:** | ||
- [InMemoryWriter](../../../../src/batch/src/Test/Job/Item/Writer/InMemoryWriter.php): | ||
write in a private var which can be accessed afterward in your tests. | ||
- [TestDebugWriter](../../../../src/batch/src/Test/Job/Item/Writer/TestDebugWriter.php): | ||
dummy item writer that you can use in your unit tests. | ||
|
||
## On the same subject | ||
|
||
- [What is an item job ?](../item-job.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.