Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changelog/package-composer-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
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.
Keep formatter data fixtures outside development classmaps during optimized installs.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
58 changes: 54 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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/"
Expand All @@ -23,7 +63,10 @@
"autoload-dev": {
"psr-4": {
"FastForward\\CodeStandards\\Tests\\": "tests/"
}
},
"exclude-from-classmap": [
"/tests/Fixtures/"
]
},
"bin": [
"bin/code-standards"
Expand All @@ -42,6 +85,8 @@
"scripts": {
"test": "phpunit",
"check": [
"@composer validate --strict",
"@composer check-platform-reqs",
"@test",
"@php bin/code-standards check --all"
],
Expand All @@ -53,5 +98,10 @@
"platform": {
"php": "8.3.0"
}
},
"extra": {
"skills": {
"source": "resources/skills"
}
}
}
5 changes: 3 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php" cacheDirectory=".phpunit.cache" failOnWarning="true" failOnRisky="true">
<testsuites><testsuite name="regression"><directory>tests</directory></testsuite></testsuites>
<testsuites>
<testsuite name="regression">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>
Loading