diff --git a/.changelog/package-readme.md b/.changelog/package-readme.md new file mode 100644 index 0000000..425c91a --- /dev/null +++ b/.changelog/package-readme.md @@ -0,0 +1,7 @@ +--- +category: changed +type: patch +pull_request: 34 +--- + +Organize the README around verified installation, commands, configuration, integration and compatibility, with source-backed badges, API summary and contributor guidance. diff --git a/README.md b/README.md index f690a8d..ab01867 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,37 @@ # Fast Forward Code Standards +[![PHP](https://img.shields.io/badge/php-%5E8.3-777BB4?logo=php&logoColor=white)](composer.json) +[![Composer Package](https://img.shields.io/badge/composer-fast--forward%2Fcode--standards-F28D1A?logo=composer&logoColor=white)](https://packagist.org/packages/fast-forward/code-standards) +[![Tests](https://img.shields.io/github/actions/workflow/status/php-fast-forward/code-standards/repository-ci.yml?branch=main&label=tests)](https://github.com/php-fast-forward/code-standards/actions/workflows/repository-ci.yml) +[![Docs](https://img.shields.io/badge/docs-source-38BDF8)](docs/architecture.md) +[![License](https://img.shields.io/github/license/php-fast-forward/code-standards?color=64748B)](LICENSE) +[![GitHub Sponsors](https://img.shields.io/github/sponsors/php-fast-forward?color=EC4899)](https://github.com/sponsors/php-fast-forward) + Focused PHP style and static syntax checks, independent of DevTools. The library provides an extendable ECS PSR-12 preset; the CLI checks tracked PHP files or the files changed by an exact PR head. This initial increment validates PHP syntax and style, not type correctness, application behavior or coverage. -## Local development and first adoption +## ✨ Features + +- Native ECS configuration with consumer overrides applied last. +- Read-only syntax/style checking and explicitly requested local fixes. +- Exact PR merge-base selection with binary-safe file paths. +- Invocable Symfony Console commands composed with Fast Forward Container. +- An unprivileged reusable workflow and a portable consumption skill. + +## 📦 Installation and requirements + +Install the published development tool in your Git project: + +```sh +composer require --dev fast-forward/code-standards:^0.1 --no-plugins --no-scripts +vendor/bin/code-standards check --all +``` + +The verified first release is `v0.1.0`; select a compatible version deliberately. +The separate GitHub `v0` workflow channel can advance across development minors. + Requires PHP 8.3+, Git and Composer runtime API 2.2+ for installed binary proxies. Composer resolves the tool runtime independently from @@ -23,6 +49,8 @@ and activation are explicit. The development `check` script validates Composer metadata and the actual platform before running this package's tests and style check. Operational channel dependencies remain development-only. +For a reviewed source checkout: + ```sh composer install --no-plugins --no-scripts php bin/code-standards help @@ -32,6 +60,8 @@ php bin/code-standards fix --all composer test ``` +## 🛠️ Usage + `check` reports violations with a nonzero status and does not change source. The default preset stores its ECS cache beneath the system temporary directory, in `fast-forward-code-standards/`. @@ -53,13 +83,13 @@ Symfony Console provides `help check`, standard global flags and both `--option=value` and `--option value`. Error diagnostics use stderr. Empty paths, conflicting scan modes and unsupported arguments are rejected explicitly. -### Library and local configuration +## ⚙️ Configuration and extension -Once a reviewed version/ref is available, install `fast-forward/code-standards` -as development tooling. No release of this package is assumed by these examples. -To trial before publication, use a Composer path repository pointing at this -checkout, require `*@dev`, and disable plugins/scripts. Production adoption must -select the reviewed Composer version and workflow/runtime refs together. +Install `fast-forward/code-standards` as development tooling. Select the reviewed +Composer version and workflow/runtime refs independently and deliberately. For +an isolated source trial, a local Composer path repository may require `*@dev` +with plugins/scripts disabled; that constraint describes the checkout, not a +published release. ```php