{"id":15029346,"url":"https://github.com/alexmanno/pipeline-remix","last_synced_at":"2026-02-25T05:13:52.380Z","repository":{"id":56944644,"uuid":"111962176","full_name":"alexmanno/pipeline-remix","owner":"alexmanno","description":"Reinvented pipelines for PHP","archived":false,"fork":false,"pushed_at":"2017-12-13T07:51:50.000Z","size":65,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T11:35:19.869Z","etag":null,"topics":["oop","php7","php71","php72","pipelines","stage","state"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexmanno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-24T23:18:17.000Z","updated_at":"2022-02-12T14:34:48.000Z","dependencies_parsed_at":"2022-08-21T02:40:22.159Z","dependency_job_id":null,"html_url":"https://github.com/alexmanno/pipeline-remix","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alexmanno/pipeline-remix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmanno%2Fpipeline-remix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmanno%2Fpipeline-remix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmanno%2Fpipeline-remix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmanno%2Fpipeline-remix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexmanno","download_url":"https://codeload.github.com/alexmanno/pipeline-remix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmanno%2Fpipeline-remix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29811531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T03:30:18.102Z","status":"ssl_error","status_checked_at":"2026-02-25T03:30:17.799Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oop","php7","php71","php72","pipelines","stage","state"],"created_at":"2024-09-24T20:10:22.227Z","updated_at":"2026-02-25T05:13:52.345Z","avatar_url":"https://github.com/alexmanno.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pipeline-remix\nReinvented pipelines for PHP\n\n[![Latest Stable Version](https://poser.pugx.org/alexmanno/pipeline-remix/version)](https://packagist.org/packages/alexmanno/pipeline-remix) \n[![Latest Unstable Version](https://poser.pugx.org/alexmanno/pipeline-remix/v/unstable)](//packagist.org/packages/alexmanno/pipeline-remix) \n[![GitHub license](https://img.shields.io/github/license/alexmanno/pipeline-remix.svg)](https://github.com/alexmanno/pipeline-remix/blob/master/LICENSE.md) \n[![composer.lock available](https://poser.pugx.org/alexmanno/pipeline-remix/composerlock)](https://packagist.org/packages/alexmanno/pipeline-remix) \n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/alexmanno/pipeline-remix/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/alexmanno/pipeline-remix/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/alexmanno/pipeline-remix/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/alexmanno/pipeline-remix/?branch=master)\n[![Build Status](https://scrutinizer-ci.com/g/alexmanno/pipeline-remix/badges/build.png?b=master)](https://scrutinizer-ci.com/g/alexmanno/pipeline-remix/build-status/master)\n\n\n## What's a Pipeline\nA pipeline is a set of data processing elements connected in series, where the output of one element is the input of the next one.\n\n## Installation\n### From Composer\nTo use this package, use Composer:\n\n * from CLI: `composer require alexmanno/pipeline-remix`\n * or, directly in your `composer.json`:\n\n```json\n{\n    \"require\": {\n        \"alexmanno/pipeline-remix\": \"dev-master\"\n    }\n}\n```\n\n## Architecture\n\n### Pipeline\n\nA Pipeline is a simple SplQueue of Stage. \n\nYou can initialize it in this way: `$pipeline = new AlexManno\\Remix\\Pipelines\\Pipeline();`\n\nYou can add Stage to Pipeline using `$pipeline-\u003epipe($stage)`\n\n### Stage\n\nA Stage is an object that implements `AlexManno\\Remix\\Pipelines\\Interfaces\\StageInterface` and has an `__invoke()` method.\n\nThis object is the smallest part of the pipeline and it should be a single operation.\n\nYou can create a class that implements that interface. \n\nEx.\n```php\n class MyCoolStage implements AlexManno\\Remix\\Pipelines\\Interfaces\\StageInterface\n {\n    /**\n     * @param Payload $payload\n     */\n    public function __invoke(Payload $payload)\n    {\n        $payload-\u003esetData('Hello!');\n        \n        return $payload;\n    }\n}\n```\n\n### Payload\n\nPayload is an object that implements `PayloadInterface` and can store any kind of data.\nFor example in a web application it can store `Request` and `Response`.\n\nEx.\n```php\nclass Payload implements AlexManno\\Remix\\Pipelines\\Interfaces\\PayloadInterface\n{\n    /** @var RequestInterface */\n    public $request;\n    /** @var ResponseInterface */\n    public $response;\n}\n```\n\n## Compose and run your pipeline\n\nIf you have already initialized Payload object and Stages objects you can compose your pipeline.\n\nEx.\n```php\n// -- Initialized objects: $payload, $pipeline, $stage1, $stage2 --\n\n$pipeline\n    -\u003epipe($stage1) // Add $stage1 to queue\n    -\u003epipe($stage2); // Add $stage2 to queue\n\n$pipeline($payload);  // Run pipeline: invoke $stage1 and then $stage2 with payload from $stage1\n```\n\nYou can also compose two or more pipelines together using method `add()`\n\nEx.\n\n```php\n// -- Initialized objects: $payload, $pipeline1, $pipeline2, $stage1, $stage2 --\n\n$pipeline1-\u003epipe($stage1); // Add $stage1 to $pipeline1\n$pipeline2-\u003epipe($stage2); // Add $stage2 to $pipeline2\n\n$pipeline1-\u003eadd($pipeline2); // Add stages from $pipeline2\n\n$payload = $pipeline1($payload); // Run pipeline: invoke $stage1 (from $pipeline1) and then $stage2 (from $pipeline2) with payload from $stage1\n\n```\n\n## Examples\n\n * Using Classes [Example-00](examples/example-00.php)\n\n\n## Conclusion\n\nI hope you found useful this repo. Thanks for attention. \n\nMade with :heart: by [@alexmanno](https://aka.am)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmanno%2Fpipeline-remix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexmanno%2Fpipeline-remix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmanno%2Fpipeline-remix/lists"}