{"id":22648236,"url":"https://github.com/MatthiasMolitor/CommandLockingBundle","last_synced_at":"2026-04-28T17:02:49.384Z","repository":{"id":62525270,"uuid":"58777080","full_name":"MatthiasMolitor/CommandLockingBundle","owner":"MatthiasMolitor","description":"Adds an optional locking feature to all console commands that can be used to prevent parallel execution.","archived":false,"fork":false,"pushed_at":"2016-05-29T19:58:42.000Z","size":56,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T16:29:50.390Z","etag":null,"topics":["bundle","cli","locking","php","symfony","symfony-bundle"],"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/MatthiasMolitor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-13T22:52:20.000Z","updated_at":"2016-07-08T20:15:22.000Z","dependencies_parsed_at":"2022-11-02T14:15:40.578Z","dependency_job_id":null,"html_url":"https://github.com/MatthiasMolitor/CommandLockingBundle","commit_stats":null,"previous_names":["matthiasmolitor/commandlockingbundle"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/MatthiasMolitor/CommandLockingBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthiasMolitor%2FCommandLockingBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthiasMolitor%2FCommandLockingBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthiasMolitor%2FCommandLockingBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthiasMolitor%2FCommandLockingBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatthiasMolitor","download_url":"https://codeload.github.com/MatthiasMolitor/CommandLockingBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthiasMolitor%2FCommandLockingBundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"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":["bundle","cli","locking","php","symfony","symfony-bundle"],"created_at":"2024-12-09T07:55:31.233Z","updated_at":"2026-04-28T17:02:48.808Z","avatar_url":"https://github.com/MatthiasMolitor.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CommandLockingBundle #\n\n[![Build Status](https://travis-ci.org/Matthimatiker/CommandLockingBundle.svg?branch=master)](https://travis-ci.org/Matthimatiker/CommandLockingBundle)\n[![Coverage Status](https://coveralls.io/repos/github/Matthimatiker/CommandLockingBundle/badge.svg?branch=master)](https://coveralls.io/github/Matthimatiker/CommandLockingBundle?branch=master)\n\nSometimes you want to ensure that a Symfony console command does not run in parallel.\nThis bundle adds an optional locking feature to all console commands that can be used to prevent parallel execution.\n\n## Installation ##\n\nInstall the bundle via [Composer](https://getcomposer.org):\n\n    composer require matthimatiker/command-locking-bundle\n    \nThen register the bundle in your ``AppKernel``:\n\n    \u003c?php\n    // app/AppKernel.php\n    \n    public function registerBundles()\n    {\n        $bundles = array(\n            // ...\n            new \\Matthimatiker\\CommandLockingBundle\\MatthimatikerCommandLockingBundle()\n        );\n        // ...\n    }\n\n## Usage ##\n\nSimply pass the ``--lock`` option to *any* command to ensure that parallel runs are prohibited:\n\n    app/console cache:warmup --lock\n    \nIf the command did not terminate yet and the same command is called again (in lock mode), then\nit is simply skipped and a notice is shown.\n\nThe default locking implementation relies on the filesystem and uses Symfony's \n[LockHandler](https://symfony.com/doc/current/components/filesystem/lock_handler.html). \nThis avoids parallel execution as long as your application runs on a single system.\nIf you need a distributed lock, then you will have to write your own lock manager.\n\n### Custom Lock Managers ###\n\nA custom lock manager must implement ``\\Matthimatiker\\CommandLockingBundle\\Locking\\LockManagerInterface``.\nAfterwards it must be registered as service and tagged as ``matthimatiker_command_locking.console.lock_manager``:\n\n    my.custom_lock_manager:\n        class: My\\Custom\\LockManager\n        tags:\n            - { name: matthimatiker_command_locking.console.lock_manager, alias: custom }\n\nAn alias must be defined together with the tag (``custom`` in this example) and is used to reference \nthe new lock manager:\n\n    app/console cache:warmup --lock=custom\n\n## Known Issues ##\n\nWhen sub-command are called as described in the [official documentation](http://symfony.com/doc/current/components/console/introduction.html#calling-an-existing-command),\nthen locking cannot be used for the sub-commands as the life-cycle events are not fired.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMatthiasMolitor%2FCommandLockingBundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMatthiasMolitor%2FCommandLockingBundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMatthiasMolitor%2FCommandLockingBundle/lists"}