Download the PHP package lemric/batch-request without Composer
On this page you can find all versions of the php package lemric/batch-request. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package batch-request
Lemric Batch Request
Batch HTTP API calls into a single request. Compatible with Symfony 6.4+ / 7 / 8 and Laravel 10+.
Send one JSON envelope containing multiple operations. Independent read-only operations may run in parallel (PHP Fibers); write operations stay serialised. When every operation finishes, a consolidated JSON response is returned and the HTTP connection is closed.
Requirements
| Requirement | Version |
|---|---|
| PHP | ≥ 8.2 |
| Symfony* | ^6.4 | ^7 | ^8 |
| Laravel* | ^10 | ^11 | ^12 |
* Framework packages are optional — install only the bridge you need. See Installation.
Installation
Quick Start
Symfony
Note: The legacy
Lemric\BatchRequest\BatchRequestclass is deprecated and will be removed in 3.2. PreferSymfonyBatchRequestFacade.
Laravel
Example request
Example response
The order of responses always matches the order of operations.
Documentation
| Topic | Description |
|---|---|
| Installation | Composer setup, optional dependencies |
| Usage | Request / response protocol |
| Responses | Content types, binary payloads, headers |
| Errors | Sub-request failures & top-level errors |
| Security | Hardening model & threat mitigations |
| Architecture | Handler, Fibers, validators |
| Symfony integration | Bundle, configuration, profiler, rate limiting |
| Laravel integration | Service provider, configuration, controller |
Full table of contents: docs/index.md.
Features
- Framework bridges for Symfony (
BatchRequestBundle) and Laravel - Fiber-based concurrency for contiguous read-only (
GET/HEAD) groups, with bounded concurrency - OWASP-oriented validation (path traversal, CRLF, SSRF, recursive batches, header injection)
- RFC 7807 problem documents for failed sub-responses and top-level errors
- Mixed media types in one batch (JSON, HTML, XML, binary/base64,
BinaryFileResponse,StreamedResponse) - Symfony Web Profiler panel (dev)
- Optional rate limiting via
symfony/rate-limiter
Security
If you discover a security vulnerability, please follow the process described in SECURITY.md. Do not open a public issue.
Contributing
- Run the test suite:
composer test - Static analysis:
composer analyse - Bug reports and pull requests are welcome on GitHub.
License
This package is released under the MIT license.