{"id":17164300,"url":"https://github.com/norberttech/symfony-process-executor","last_synced_at":"2025-04-13T13:23:53.449Z","repository":{"id":36985061,"uuid":"258155565","full_name":"norberttech/symfony-process-executor","owner":"norberttech","description":"💻 Symfony Process Component on steroids, async/sync execution chain.","archived":false,"fork":false,"pushed_at":"2025-03-04T21:08:26.000Z","size":6729,"stargazers_count":12,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"2.x","last_synced_at":"2025-03-27T04:22:47.856Z","etag":null,"topics":["execution","parallel","process","symfony"],"latest_commit_sha":null,"homepage":"","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/norberttech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-23T09:31:27.000Z","updated_at":"2025-03-07T22:25:47.000Z","dependencies_parsed_at":"2023-11-14T11:29:31.146Z","dependency_job_id":"9c446203-e5af-4f1f-9ba1-643b593aefbb","html_url":"https://github.com/norberttech/symfony-process-executor","commit_stats":{"total_commits":319,"total_committers":3,"mean_commits":"106.33333333333333","dds":0.3573667711598746,"last_synced_commit":"97ccdd3bbe66b05857b99d01e190093937938257"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norberttech%2Fsymfony-process-executor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norberttech%2Fsymfony-process-executor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norberttech%2Fsymfony-process-executor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norberttech%2Fsymfony-process-executor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/norberttech","download_url":"https://codeload.github.com/norberttech/symfony-process-executor/tar.gz/refs/heads/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248718726,"owners_count":21150631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["execution","parallel","process","symfony"],"created_at":"2024-10-14T22:51:32.504Z","updated_at":"2025-04-13T13:23:53.409Z","avatar_url":"https://github.com/norberttech.png","language":"PHP","readme":"# Symfony Process Executor \n\n![Tests](https://github.com/norberttech/symfony-process-executor/workflows/Tests/badge.svg?branch=2.x)\n\nTiny library that simplifies launching multiple processes in parallel (or not). \n\n### Installation\n\n```bash\ncomposer require norberttech/symfony-process-executor\n```\n\n### Examples \n\n```php\n\u003c?php\n\nuse NorbertTech\\SymfonyProcessExecutor\\AsynchronousExecutor;\nuse NorbertTech\\SymfonyProcessExecutor\\ProcessPool;\nuse NorbertTech\\SymfonyProcessExecutor\\ProcessWrapper;\nuse Symfony\\Component\\Process\\Process;\n\n$processes = new ProcessPool(\n    Process::fromShellCommandline('sleep 1 \u0026\u0026 echo 1'),\n    Process::fromShellCommandline('sleep 2 \u0026\u0026 echo 2'),\n    Process::fromShellCommandline('sleep 3 \u0026\u0026 echo 3'),\n    Process::fromShellCommandline('sleep 4 \u0026\u0026 echo 4'),\n    Process::fromShellCommandline('sleep 5 \u0026\u0026 echo 5')\n);\n\n$executor = new AsynchronousExecutor($processes);\n\n$executor-\u003eexecute();\n\n$executor-\u003ewaitForAllToFinish();\n\n$executor-\u003epool()-\u003eeach(function (ProcessWrapper $processWrapper) {\n    var_dump($processWrapper-\u003eexitCode());\n    var_dump(\\trim($processWrapper-\u003eoutput()));\n    var_dump($processWrapper-\u003eexecutionTime()-\u003einSeconds());\n    var_dump($processWrapper-\u003eexecutionTime()-\u003einMilliseconds());\n    var_dump($processWrapper-\u003eexecutionTime()-\u003emicrosecond());\n    echo \"----\\n\";\n});\n\necho \\sprintf(\"Successfully finished child processes: %d\\n\", $executor-\u003epool()-\u003ewithSuccessExitCode());\necho \\sprintf(\"Failure finished child processes: %d\\n\", $executor-\u003epool()-\u003ewithFailureExitCode());\necho \\sprintf(\"Total execution time [s]: %d\\n\", $executor-\u003eexecutionTime()-\u003einSecondsPreciseString());\n```\n\nOutput: \n\n```bash\nphp examples/async_multiple_success_processes.php \n\nint(0)\nstring(1) \"1\"\nint(1)\nint(1033)\nint(1033295)\n----\nint(0)\nstring(1) \"2\"\nint(2)\nint(2064)\nint(2064680)\n----\nint(0)\nstring(1) \"3\"\nint(3)\nint(3092)\nint(3092137)\n----\nint(0)\nstring(1) \"4\"\nint(4)\nint(4026)\nint(4026060)\n----\nint(0)\nstring(1) \"5\"\nint(5)\nint(5052)\nint(5052531)\n----\nSuccessfully finished child processes: 5\nFailure finished child processes: 0\nTotal execution time [s]: 5\n```\n\n## Tests\n\nAll tests for this library are written as phpt files, you can read more about it here https://qa.php.net/phpt_details.php. \n\nIn order to launch full testsuite use composer\n\n```php\ncomposer tests\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorberttech%2Fsymfony-process-executor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorberttech%2Fsymfony-process-executor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorberttech%2Fsymfony-process-executor/lists"}