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.
What types of item processors exists?
Built-in item processors:
ArrayMapProcessor: apply a callback to each element of array items.
CallbackProcessor: use a callback to transform each items.
ChainProcessor: chain transformation of multiple item processor, one after the other.
FilterUniqueProcessor: assign an identifier to each item, and skip already encountered items.
NullProcessor: perform no transformation on items.
RoutingProcessor: route processing to different processor based on your logic.
Item processors from bridges:
From
symfony/validatorbridge:SkipInvalidItemProcessor: validate item and throw exception if invalid that will cause item to be skipped.
From
symfony/serializerbridge:DenormalizeItemProcessor: denormalize each item.
NormalizeItemProcessor: normalize each item.
Item processors for testing purpose:
TestDebugProcessor: dummy item processor that you can use in your unit tests.
See also