From b7ca37fdf45115a63dce9b0e422f505f59297558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Sun, 25 Oct 2026 13:09:53 -0300 Subject: [PATCH 1/2] feat: complete Composer package and skill contracts --- .changelog/package-composer-contract.md | 7 ++++ README.md | 9 ++++- composer.json | 53 +++++++++++++++++++++++-- composer.lock | 5 ++- phpunit.xml | 6 ++- 5 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 .changelog/package-composer-contract.md diff --git a/.changelog/package-composer-contract.md b/.changelog/package-composer-contract.md new file mode 100644 index 0000000..6bdde95 --- /dev/null +++ b/.changelog/package-composer-contract.md @@ -0,0 +1,7 @@ +--- +category: added +type: minor +--- + +Complete package metadata and portable skill discovery, declare direct container +and Composer binary-runtime contracts, and validate metadata/platform in self-checks. diff --git a/README.md b/README.md index 2e5ca84..726d1ec 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ style, not type correctness, application behavior or coverage. ## Local development and first adoption -Requires PHP 8.3+ and Git. Composer resolves the tool runtime independently from +Requires PHP 8.3+, Git and Composer runtime API 2.2+ for installed binary proxies. +Composer resolves the tool runtime independently from the consumer application's PHP minimum; syntax is checked using the executing PHP binary. No PHP migration rules are enabled. Review compatibility with the application's minimum PHP before adopting a preset. @@ -16,6 +17,12 @@ Workflow guards and their contributor tests additionally require Bash and jq. Hosted Ubuntu runners provide both; the Composer library and CLI use the PHP dependencies declared in this package. +Composer exposes the portable skill through `extra.skills.source` at +`resources/skills`. `llm/skills` is an optional consumer integration; installation +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. + ```sh composer install --no-plugins --no-scripts php bin/code-standards help diff --git a/composer.json b/composer.json index d4966f7..9458df5 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,60 @@ { "name": "fast-forward/code-standards", - "description": "Focused PHP style presets, syntax checks and changed-file automation.", "type": "library", + "description": "Focused PHP style presets, syntax checks and changed-file automation.", "license": "MIT", + "keywords": [ + "code-standards", + "code-style", + "ecs", + "fast-forward", + "php", + "symfony-console" + ], + "readme": "README.md", + "authors": [ + { + "name": "Felipe Sayão Lobato Abreu", + "email": "github@mentordosnerds.com", + "homepage": "https://github.com/coisa", + "role": "Maintainer" + } + ], + "homepage": "https://github.com/php-fast-forward/code-standards", + "support": { + "issues": "https://github.com/php-fast-forward/code-standards/issues", + "source": "https://github.com/php-fast-forward/code-standards", + "docs": "https://github.com/php-fast-forward/code-standards#readme" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/php-fast-forward" + }, + { + "type": "custom", + "url": "https://www.paypal.com/donate/?business=JLDAF45XZ8D84" + } + ], "require": { "php": "^8.3", + "composer-runtime-api": "^2.2", + "container-interop/service-provider": "^0.4.1", "fast-forward/container": "~1.10.1", + "psr/container": "^1.1 || ^2.0", "symfony/console": "^7.4 || ^8.0", "symfony/process": "^7.4 || ^8.0", "symplify/easy-coding-standard": "^13.0" }, "require-dev": { "phpunit/phpunit": "^12.5", - "symfony/http-client": "^7.4 || ^8.0", - "symfony/filesystem": "^7.4 || ^8.0" + "symfony/filesystem": "^7.4 || ^8.0", + "symfony/http-client": "^7.4 || ^8.0" + }, + "suggest": { + "llm/skills": "Optionally synchronize the bundled agent skill in consumer projects." }, + "minimum-stability": "stable", "autoload": { "psr-4": { "FastForward\\CodeStandards\\": "src/" @@ -42,6 +82,8 @@ "scripts": { "test": "phpunit", "check": [ + "@composer validate --strict", + "@composer check-platform-reqs", "@test", "@php bin/code-standards check --all" ], @@ -53,5 +95,10 @@ "platform": { "php": "8.3.0" } + }, + "extra": { + "skills": { + "source": "resources/skills" + } } } diff --git a/composer.lock b/composer.lock index 47d84d3..e181612 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "799e088ae46295cbe5a498b4f4d8523c", + "content-hash": "d4501df051e73a0498012c3f268844ba", "packages": [ { "name": "brick/varexporter", @@ -3430,7 +3430,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8.3" + "php": "^8.3", + "composer-runtime-api": "^2.2" }, "platform-dev": {}, "platform-overrides": { diff --git a/phpunit.xml b/phpunit.xml index 041b153..45d0e48 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,4 +1,8 @@ - tests + + + tests + + From 46cd1b269ea61e6d297faa1b9ee6491fd9d1c860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Sun, 25 Oct 2026 13:12:40 -0300 Subject: [PATCH 2/2] fix: exclude formatter data from development classmaps --- .changelog/package-composer-contract.md | 1 + composer.json | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.changelog/package-composer-contract.md b/.changelog/package-composer-contract.md index 6bdde95..9a90993 100644 --- a/.changelog/package-composer-contract.md +++ b/.changelog/package-composer-contract.md @@ -5,3 +5,4 @@ type: minor Complete package metadata and portable skill discovery, declare direct container and Composer binary-runtime contracts, and validate metadata/platform in self-checks. +Keep formatter data fixtures outside development classmaps during optimized installs. diff --git a/composer.json b/composer.json index 9458df5..967ad8d 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,10 @@ "autoload-dev": { "psr-4": { "FastForward\\CodeStandards\\Tests\\": "tests/" - } + }, + "exclude-from-classmap": [ + "/tests/Fixtures/" + ] }, "bin": [ "bin/code-standards"