{"id":17291912,"url":"https://github.com/veewee/composer-run-parallel","last_synced_at":"2025-04-07T07:15:29.770Z","repository":{"id":46081354,"uuid":"316542116","full_name":"veewee/composer-run-parallel","owner":"veewee","description":"Run composer tasks in parallel","archived":false,"fork":false,"pushed_at":"2023-11-04T12:21:31.000Z","size":8281,"stargazers_count":81,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-29T16:20:27.952Z","etag":null,"topics":["composer","parallel","scripts"],"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/veewee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["veewee"]}},"created_at":"2020-11-27T15:50:22.000Z","updated_at":"2024-01-25T06:47:57.000Z","dependencies_parsed_at":"2023-12-16T09:00:52.078Z","dependency_job_id":"8ae10737-b086-4c6d-be02-5321aafb2f5d","html_url":"https://github.com/veewee/composer-run-parallel","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":0.12,"last_synced_commit":"60f357260cac77f3cad7050eceacebd3fdd907af"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veewee%2Fcomposer-run-parallel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veewee%2Fcomposer-run-parallel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veewee%2Fcomposer-run-parallel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veewee%2Fcomposer-run-parallel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veewee","download_url":"https://codeload.github.com/veewee/composer-run-parallel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608153,"owners_count":20965952,"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":["composer","parallel","scripts"],"created_at":"2024-10-15T10:42:14.398Z","updated_at":"2025-04-07T07:15:29.740Z","avatar_url":"https://github.com/veewee.png","language":"PHP","readme":"# Composer run parallel\n\nThis composer plugin allows you to run the tasks inside your composer file in parallel.\nNo more waiting on one specific task!\n\n[Please find my blog post describing the whole story.](https://veewee.github.io/blog/run-composer-tasks-in-parallel/)\n\n## Installation\n\n```bash\ncomposer require --dev veewee/composer-run-parallel\n```\n\nor globally ...\n\n```bash\ncomposer require --global veewee/composer-run-parallel\n```\n\n## Examples\n\n```json\n{\n  \"scripts\": {\n    \"php1\": \"@php -r 'sleep(3); echo \\\"1\\\";'\",\n    \"php2\": \"@php -r 'echo \\\"2\\\";'\"\n  }\n}\n```\n\nFollowing command will result in parallel execution of both php1 and php2:\n\n```bash\ncomposer run parallel php1 php2\n```\n\nYou can even create a shortcut script for the parallel function like this:\n\n```json\n{\n  \"scripts\": {\n    \"php1\": \"@php -r 'sleep(3); echo \\\"1\\\";'\",\n    \"php2\": \"@php -r 'echo \\\"2\\\";'\",\n    \"php1And2\": \"@parallel php1 php2\"\n  }\n}\n```\n\n```bash\ncomposer run php1And2\n```\n\nWhat if a task fails?\n\n```json\n{\n  \"scripts\": {\n    \"php1\": \"@php -r 'sleep(3); echo \\\"1\\\";'\",\n    \"phpfail\": \"@php -r 'throw new Exception(\\\"FAIL\\\");'\"\n  }\n}\n```\n\nAll tasks will be executed and if one fails, the parallel task will fail as well:\n\n```bash\ncomposer run parallel php1 phpfail\n\nSuccesfully ran:\nphp1\n\nFailed running:\nphpfail\n\nNot all tasks could be executed succesfully!\n```\n\n*Note*: You can also use the shorthand command:\n\n```bash\ncomposer parallel php1 phpfail\n```\n\nPretty cool right?\nWhat If I told you there is even more?!\n\n```json\n{\n  \"scripts\": {\n    \"wicked\": [\n      \"@parallel vendor php2\",\n      \"@php1\"\n    ]\n  }\n}\n```\n\nYou can even mix parallel tasks with serial tasks and even nest multiple parallel tasks at the same time.\nThis way you can create flows like:\n\n- do some checks first\n- next run some stuff in parallel\n- finish up with some blocking cleanup task if everything was ok\n\n","funding_links":["https://github.com/sponsors/veewee"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveewee%2Fcomposer-run-parallel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveewee%2Fcomposer-run-parallel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveewee%2Fcomposer-run-parallel/lists"}