{"id":20004743,"url":"https://github.com/ramsey/devtools","last_synced_at":"2025-03-02T00:40:43.785Z","repository":{"id":54050588,"uuid":"291129378","full_name":"ramsey/devtools","owner":"ramsey","description":":toolbox: A Composer plugin to aid PHP library and application development.","archived":false,"fork":false,"pushed_at":"2024-04-27T23:17:41.000Z","size":206,"stargazers_count":67,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-12T16:52:41.847Z","etag":null,"topics":["composer-plugin","developer-tools","development","development-tools","devtools","tools"],"latest_commit_sha":null,"homepage":"","language":null,"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-08-28T19:26:16.000Z","updated_at":"2024-11-18T22:00:18.000Z","dependencies_parsed_at":"2024-04-28T00:23:39.312Z","dependency_job_id":"bd84707e-75c7-49eb-9e91-6ec637c17e99","html_url":"https://github.com/ramsey/devtools","commit_stats":{"total_commits":59,"total_committers":3,"mean_commits":"19.666666666666668","dds":"0.15254237288135597","last_synced_commit":"ff4d4a674b1740391e4c7b4213d47deac537b99f"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsey%2Fdevtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsey%2Fdevtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsey%2Fdevtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsey%2Fdevtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramsey","download_url":"https://codeload.github.com/ramsey/devtools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241444006,"owners_count":19963749,"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","development-tools","devtools","tools"],"created_at":"2024-11-13T05:32:45.852Z","updated_at":"2025-03-02T00:40:43.760Z","avatar_url":"https://github.com/ramsey.png","language":null,"readme":"\u003ch1 align=\"center\"\u003eramsey/devtools\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eA Composer plugin to aid PHP library and application development.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/ramsey/devtools\"\u003e\u003cimg src=\"https://img.shields.io/badge/source-ramsey/devtools-blue.svg?style=flat-square\" alt=\"Source Code\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/ramsey/devtools\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/ramsey/devtools.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.svg?style=flat-square\u0026colorB=%238892BF\" alt=\"PHP Programming Language\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ramsey/devtools/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/ramsey/devtools.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\nI created this [Composer](https://getcomposer.org) plugin because I got tired of\nmaking changes to development tools and scripts in my repositories, only to find\nI liked the change so much, I now needed to apply it to all my repositories.\nThis is an effort to consolidate and simplify.\n\nThese tools might not be for you, and that's okay.\n\nMaybe these tools help a lot, but you have different needs. That's also okay.\nYou may create your own devtools, requiring\n[ramsey/devtools-lib](https://github.com/ramsey/devtools-lib) (the library code\nbehind this plugin), to extend and add to these tools, creating your own\nComposer plugin.\n\nOf course, if you want to help improve these tools, I welcome your contributions.\nFeel free to open issues, ask about or request features, and submit PRs. I can't\nwait to see what you come up with.\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 as a development dependency using\n[Composer](https://getcomposer.org).\n\n``` bash\ncomposer require --dev ramsey/devtools\n```\n\n## Usage\n\nThis package is a Composer plugin. This means Composer recognizes that it\nprovides custom functionality to your `composer` command. After installation,\ntype `composer list`, and you'll see a lot of new commands that this plugin\nprovides.\n\n``` bash\ncomposer list\n```\n\n### Add a Command Prefix\n\nThe commands this plugin provides are all intermingled with the rest of the\nComposer commands, so it may be hard to find them all. We have a way to group\nthem by command namespace, though. Open `composer.json` and add a\n`ramsey/devtools.command-prefix` property to the `extra` section. You may use\nany prefix you wish.\n\n``` json\n{\n    \"extra\": {\n        \"ramsey/devtools\": {\n            \"command-prefix\": \"my-prefix\"\n        }\n    }\n}\n```\n\nNow, when you type `composer list` (or just `composer`), you'll see a section\nof commands that looks like this:\n\n```\n my-prefix\n  my-prefix:analyze:all           Runs all static analysis checks.\n  my-prefix:analyze:phpstan       Runs the PHPStan static analyzer.\n  my-prefix:analyze:psalm         Runs the Psalm static analyzer.\n  my-prefix:build:clean           Cleans the build/ directory.\n  my-prefix:build:clean:all       Cleans the build/ directory.\n  my-prefix:build:clean:cache     Cleans the build/cache/ directory.\n  my-prefix:build:clean:coverage  Cleans the build/coverage/ directory.\n  my-prefix:changelog             Support for working with Keep A Changelog.\n  my-prefix:license               Checks dependency licenses.\n  my-prefix:lint:all              Runs all linting checks.\n  my-prefix:lint:fix              Auto-fixes coding standards issues, if possible.\n  my-prefix:lint:pds              Validates project compliance with pds/skeleton.\n  my-prefix:lint:style            Checks for coding standards issues.\n  my-prefix:lint:syntax           Checks for syntax errors.\n  my-prefix:test:all              Runs linting, static analysis, and unit tests.\n  my-prefix:test:coverage:ci      Runs unit tests and generates CI coverage reports.\n  my-prefix:test:coverage:html    Runs unit tests and generates HTML coverage report.\n  my-prefix:test:unit             Runs unit tests.\n```\n\nYou can also list commands by command prefix with `composer list my-prefix`.\n\n### Extending or Overriding ramsey/devtools Commands\n\nMaybe the commands ramsey/devtools 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\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 `composer my-prefix:lint:all` or `composer my-prefix:test:all`,\nit will  execute the default behavior first and then run your additional commands.\nTo  override the default behavior so that it doesn't run at all and only your\nscripts run, specify the `override` property and 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### Composer Command Autocompletion\n\nDid you know you can set up your terminal to do Composer command autocompletion?\n\nIf you'd like to have Composer command autocompletion, you may use\n[bamarni/symfony-console-autocomplete](https://github.com/bamarni/symfony-console-autocomplete).\nInstall it globally with Composer:\n\n``` bash\ncomposer global require bamarni/symfony-console-autocomplete\n```\n\nThen, in your shell configuration file — usually `~/.bash_profile` or `~/.zshrc`,\nbut it could be different depending on your settings — ensure that your global\nComposer `bin` directory is in your `PATH`, and evaluate the\n`symfony-autocomplete` command. This will look like this:\n\n``` bash\nexport PATH=\"$(composer config home)/vendor/bin:$PATH\"\neval \"$(symfony-autocomplete)\"\n```\n\nNow, you can use the `tab` key to auto-complete Composer commands:\n\n``` bash\ncomposer my-prefix:[TAB][TAB]\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 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","funding_links":["https://github.com/sponsors/ramsey"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsey%2Fdevtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framsey%2Fdevtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsey%2Fdevtools/lists"}