{"id":20004745,"url":"https://github.com/ramsey/devtools-lib","last_synced_at":"2025-04-07T15:06:24.363Z","repository":{"id":41872966,"uuid":"302512034","full_name":"ramsey/devtools-lib","owner":"ramsey","description":"🧰 📚 The library behind ramsey/devtools, allowing for extension of the ramsey/devtools Composer plugin.","archived":false,"fork":false,"pushed_at":"2025-03-07T00:56:37.000Z","size":520,"stargazers_count":22,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"2.x","last_synced_at":"2025-03-31T14:11:13.953Z","etag":null,"topics":["composer-plugin","developer-tools","development","php"],"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/ramsey.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ramsey"}},"created_at":"2020-10-09T02:25:34.000Z","updated_at":"2025-03-07T00:57:59.000Z","dependencies_parsed_at":"2023-01-31T22:15:43.988Z","dependency_job_id":"e69bbe49-fb7b-46d3-a37e-fc6d6c6d6367","html_url":"https://github.com/ramsey/devtools-lib","commit_stats":{"total_commits":158,"total_committers":7,"mean_commits":"22.571428571428573","dds":"0.25316455696202533","last_synced_commit":"bde41a64585a32bf0986bc9dbe8c5cc5324d1901"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsey%2Fdevtools-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsey%2Fdevtools-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsey%2Fdevtools-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsey%2Fdevtools-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramsey","download_url":"https://codeload.github.com/ramsey/devtools-lib/tar.gz/refs/heads/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675596,"owners_count":20977376,"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-plugin","developer-tools","development","php"],"created_at":"2024-11-13T05:32:47.962Z","updated_at":"2025-04-07T15:06:24.341Z","avatar_url":"https://github.com/ramsey.png","language":"PHP","funding_links":["https://github.com/sponsors/ramsey"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eramsey/devtools-lib\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eThe library behind \u003ca href=\"https://github.com/ramsey/devtools\"\u003eramsey/devtools\u003c/a\u003e, allowing for extension of the ramsey/devtools Composer plugin.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/ramsey/devtools-lib\"\u003e\u003cimg src=\"https://img.shields.io/badge/source-ramsey/devtools--lib-blue.svg?style=flat-square\" alt=\"Source Code\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/ramsey/devtools-lib\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/ramsey/devtools-lib.svg?style=flat-square\u0026label=release\" alt=\"Download Package\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://php.net\"\u003e\u003cimg src=\"https://img.shields.io/packagist/php-v/ramsey/devtools-lib.svg?style=flat-square\u0026colorB=%238892BF\" alt=\"PHP Programming Language\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ramsey/devtools-lib/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/ramsey/devtools-lib.svg?style=flat-square\u0026colorB=darkcyan\" alt=\"Read License\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ramsey/devtools-lib/actions/workflows/continuous-integration.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/ramsey/devtools-lib/continuous-integration.yml?branch=2.x\u0026style=flat-square\u0026logo=github\" alt=\"Build Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/ramsey/devtools-lib\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/gh/ramsey/devtools-lib?label=codecov\u0026logo=codecov\u0026style=flat-square\" alt=\"Codecov Code Coverage\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://shepherd.dev/github/ramsey/devtools-lib\"\u003e\u003cimg src=\"https://img.shields.io/endpoint?style=flat-square\u0026url=https%3A%2F%2Fshepherd.dev%2Fgithub%2Framsey%2Fdevtools-lib%2Fcoverage\" alt=\"Psalm Type Coverage\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\nThis library is what powers the [ramsey/devtools](https://github.com/ramsey/devtools)\n[Composer](https://getcomposer.org) plugin. Since you can't extend Composer\nplugins, this exists to allow for extension. If you don't need to extend this\nfor your own plugin needs, and you want the functionality provided by the plugin,\ncheck out [ramsey/devtools](https://github.com/ramsey/devtools) instead.\n\nThis package also provides the `devtools` CLI tool, which you may use even if\nyou do not want to use the plugin functionality.\n\nThis project adheres to a [code of conduct](CODE_OF_CONDUCT.md).\nBy participating in this project and its community, you are expected to\nuphold this code.\n\n## Installation\n\nInstall this package with [Composer](https://getcomposer.org).\n\n``` bash\ncomposer require --dev ramsey/devtools-lib\n```\n\n## Usage\n\nIf using this library as a standalone tool, and not as a Composer plugin, type\n`./vendor/bin/devtools list` to see the list of commands this library provides.\n\n``` bash\n./vendor/bin/devtools list\n```\n\n\u003e [!NOTE]\n\u003e Install [ramsey/devtools](https://github.com/ramsey/devtools), instead, if you\n\u003e do not need to extend this library to create your own Composer plugin.\n\n### Extending or Overriding ramsey/devtools-lib Commands\n\nMaybe the commands ramsey/devtools-lib provides don't do everything you need, or\nmaybe you want to replace them entirely. The configuration allows you to do\nthis!\n\nUsing the `ramsey/devtools.commands` property in the `extra` section of\n`composer.json`, you may specify any command (*without* your custom prefix, if\nyou've configured one) as having other scripts to run, in addition to the\ncommand's default behavior, or you may override the default behavior entirely.\n\n\u003e [!TIP]\n\u003e If you don't want to use the property name \"ramsey/devtools,\" you may use\n\u003e \"devtools\" instead. However, if there is a conflict with another package that\n\u003e uses the `extra.devtools` property, `extra.ramsey/devtools` takes precedence,\n\u003e so you may use it to avoid conflicts.\n\nSpecifying additional scripts works exactly like\n[writing custom commands](https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands)\nin `composer.json`, but the location is different. Everything you can do with\na custom Composer command, you can do here because they're the same thing.\n\n``` json\n{\n    \"extra\": {\n        \"ramsey/devtools\": {\n            \"command-prefix\": \"my-prefix\",\n            \"commands\": {\n                \"lint:all\": {\n                    \"script\": \"@mylint\"\n                },\n                \"test:all\": {\n                    \"script\": [\n                        \"@mylint\",\n                        \"@phpbench\"\n                    ]\n                }\n            }\n        }\n    },\n    \"scripts\": {\n        \"mylint\": \"parallel-lint src tests\",\n        \"phpbench\": \"phpbench run\"\n    }\n}\n```\n\nIn this way, when you run `./vendor/bin/devtools lint:all` or\n`./vendor/bin/devtools test:all`, it will execute the default behavior first and\nthen run your additional commands. To override the default behavior so that it\ndoesn't run at all and only your scripts run, specify the `override` property\nand set it to `true`.\n\n``` json\n{\n    \"extra\": {\n        \"ramsey/devtools\": {\n            \"commands\": {\n                \"lint:all\": {\n                    \"override\": true,\n                    \"script\": \"parallel-lint src tests\"\n                }\n            }\n        }\n    }\n}\n```\n\n## Contributing\n\nContributions are welcome! To contribute, please familiarize yourself with\n[CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Coordinated Disclosure\n\nKeeping user information safe and secure is a top priority, and we welcome the\ncontribution of external security researchers. If you believe you've found a\nsecurity issue in software that is maintained in this repository, please read\n[SECURITY.md](SECURITY.md) for instructions on submitting a vulnerability report.\n\n## Copyright and License\n\nThe ramsey/devtools-lib library is copyright © [Ben Ramsey](https://benramsey.com)\nand licensed for use under the terms of the\nMIT License (MIT). Please see [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsey%2Fdevtools-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framsey%2Fdevtools-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsey%2Fdevtools-lib/lists"}