lemric/batch-processing

Batch Processing
1,013 1
Install
composer require lemric/batch-processing
Latest Version:v1.0.2
PHP:>=8.4
License:proprietary
Last Updated:Apr 27, 2026
Links: GitHub  ·  Packagist
Maintainer: Lemric

Lemric BatchProcessing is a framework-agnostic library for building robust, restartable, observable batch jobs in PHP. Compliance with PSR standards and the idiomatic PHP style.

Why Lemric BatchProcessing?

  • Production-ready — atomic per-chunk transactions, full restart semantics, durable metadata.
  • Framework-agnostic — works standalone, with optional bridges for Symfony 6.4/7+ and Laravel 11+/12+.
  • Standards-first — PSR-3 logger, PSR-6/16 cache, PSR-11 container, PSR-14 events.
  • Modern PHP — readonly classes, enums, attributes, typed properties, strict types.

Installation

composer require lemric/batch-processing

Requires PHP 8.4 or higher.

Quick Example

use Lemric\BatchProcessing\BatchProcessing;
use Lemric\BatchProcessing\Domain\JobParameters;
use Lemric\BatchProcessing\Item\Reader\IteratorItemReader;
use Lemric\BatchProcessing\Testing\InMemoryItemWriter;

$env    = BatchProcessing::inMemoryEnvironment();
$reader = new IteratorItemReader(range(1, 1000));
$writer = new InMemoryItemWriter();

$step = $env->stepBuilderFactory->get('demoStep')
    ->chunk(100, $reader, null, $writer)
    ->build();

$job = $env->jobBuilderFactory->get('demoJob')->start($step)->build();

$execution = $env->launcher->run($job, JobParameters::of(['run.id' => 1]));

echo $execution->getStatus()->value; // COMPLETED

Documentation

Full documentation lives in the docs/ directory:

Development

Clone the repository and install dependencies:

git clone https://github.com/Lemric/BatchProcessing.git
cd BatchProcessing
composer install

Run the test suite:

composer test

Run static analysis and code style fixes:

composer stan

Support

License

This project is developed by Lemric and is available under a dual licensing model:

Use case Allowed Cost
Open Source project ✅ Free
Personal non-commercial use ✅ Free
Commercial / SaaS / enterprise ❌ Paid license required
Closed-source project ❌ Paid license required

For commercial licensing inquiries, contact: dominik@labudzinski.com

See the LICENSE file for full terms.

Authors

Related Packages

spatie/laravel-failed-job-monitor

Get notified when a queued job fails

3,082,041 1,057
maqe/laravel-sqs-fifo

Laravel package that enables support for SQS FIFO Queue

141,216 15
imtigger/laravel-job-status

Laravel Job Status

2,315,053 529
maatwebsite/excel

Supercharged Excel exports and imports in Laravel

174,057,253 12,703
toin0u/geotools-laravel

Geo-related tools PHP library for Laravel 4 & 5

391,312 239

Version History

Version Released PHP License
v1.0.2 >=8.4 proprietary
v1.0.1 >=8.4 proprietary