Download the PHP package kariricode/processor-pipeline without Composer
On this page you can find all versions of the php package kariricode/processor-pipeline. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kariricode/processor-pipeline
More information about kariricode/processor-pipeline
Files in kariricode/processor-pipeline
Package processor-pipeline
Short Description A flexible and extensible processor pipeline component for the KaririCode framework. Enables the creation of modular, configurable processing chains for data transformation, validation, and sanitization tasks
License MIT
Homepage https://kariricode.org
Informations about the package processor-pipeline
KaririCode Framework: ProcessorPipeline Component
A robust and flexible component for creating and managing processing pipelines in the KaririCode Framework, providing advanced features for handling complex data processing tasks in PHP applications.
Table of Contents
- Features
- Installation
- Usage
- Basic Usage
- Advanced Usage
- Integration with Other KaririCode Components
- Development and Testing
- License
- Support and Community
- Acknowledgements
Features
- Easy creation and management of processing pipelines
- Support for both simple and configurable processors
- Context-based processor registry for organized processor management
- Seamless integration with other KaririCode components (Serializer, Validator, Normalizer)
- Extensible architecture allowing custom processors
- Built on top of the KaririCode\Contract interfaces for maximum flexibility
Installation
The ProcessorPipeline component can be easily installed via Composer, which is the recommended dependency manager for PHP projects.
To install the ProcessorPipeline component in your project, run the following command in your terminal:
This command will automatically add ProcessorPipeline to your project and install all necessary dependencies.
Requirements
- PHP 8.1 or higher
- Composer
Manual Installation
If you prefer not to use Composer, you can download the source code directly from the GitHub repository and include it manually in your project. However, we strongly recommend using Composer for easier dependency management and updates.
After installation, you can start using ProcessorPipeline in your PHP project immediately. Make sure to include the Composer autoloader in your script:
Usage
Basic Usage
-
Define your processors:
-
Set up the processor registry and builder:
- Build and use a pipeline:
Advanced Usage
Configurable Processors
Create configurable processors for more flexibility:
Integration with Other KaririCode Components
The ProcessorPipeline component is designed to work seamlessly with other KaririCode components:
- KaririCode\Serializer: Use processors to transform data before or after serialization.
- KaririCode\Validator: Create validation pipelines for complex data structures.
- KaririCode\Normalizer: Build normalization pipelines for data cleaning and standardization.
Example using ProcessorPipeline with Validator:
Development and Testing
For development and testing purposes, this package uses Docker and Docker Compose to ensure consistency across different environments. A Makefile is provided for convenience.
Prerequisites
- Docker
- Docker Compose
- Make (optional, but recommended for easier command execution)
Development Setup
-
Clone the repository:
-
Set up the environment:
-
Start the Docker containers:
- Install dependencies:
Available Make Commands
make up
: Start all services in the backgroundmake down
: Stop and remove all containersmake build
: Build Docker imagesmake shell
: Access the PHP container shellmake test
: Run testsmake coverage
: Run test coverage with visual formattingmake cs-fix
: Run PHP CS Fixer to fix code stylemake quality
: Run all quality commands (cs-check, test, security-check)
For a full list of available commands, run:
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support and Community
- Documentation: https://kariricode.org/docs/processor-pipeline
- Issue Tracker: GitHub Issues
- Community: KaririCode Club Community
Acknowledgements
- The KaririCode Framework team and contributors.
- Inspired by pipeline patterns and processing chains in software architecture.
Built with ❤️ by the KaririCode team. Empowering developers to create more robust and flexible PHP applications.