From d9233c13e254accdd019524d236a522a59ee2c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Sat, 24 Oct 2026 09:03:24 -0300 Subject: [PATCH 1/2] chore: standardize skill sources and PHPDoc bootstrap --- .changelog/consistent-skill-sources.md | 11 ++++++++ .gitattributes | 1 + .php-cs-fixer.dist.php | 38 ++++++++++++++++++++++++++ composer.json | 4 +-- skills.json | 18 ++++++++---- 5 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 .changelog/consistent-skill-sources.md create mode 100644 .php-cs-fixer.dist.php diff --git a/.changelog/consistent-skill-sources.md b/.changelog/consistent-skill-sources.md new file mode 100644 index 0000000..973c40e --- /dev/null +++ b/.changelog/consistent-skill-sources.md @@ -0,0 +1,11 @@ +--- +category: changed +type: patch +--- + +Synchronize the bundled local skill automatically and trust Fast Forward Composer +skill donors through `fast-forward/*`. +Resolve Changelog contributor skills from stable `0.4.x` releases without a +redundant skill allowlist. +Load the project autoloader for PHPDoc checks when DevTools is installed as a +dependency. diff --git a/.gitattributes b/.gitattributes index 0ebc044..ca287de 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,3 +13,4 @@ /phpunit.xml.dist export-ignore /README*.md export-ignore /skills.json export-ignore +/.php-cs-fixer.dist.php export-ignore diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..dbea6a3 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,38 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * + * @see https://github.com/php-fast-forward/enum + * @see https://github.com/php-fast-forward/enum/issues + * @see https://php-fast-forward.github.io/enum/ + * @see https://datatracker.ietf.org/doc/html/rfc2119 + */ + +use FastForward\DevTools\Path\WorkingProjectPathResolver; +use PhpCsFixer\Config; +use PhpCsFixer\Finder; + +require __DIR__ . '/vendor/autoload.php'; + +return (new Config()) + ->setRiskyAllowed(false) + ->setFinder(Finder::create()->in(__DIR__)->exclude(WorkingProjectPathResolver::TOOLING_EXCLUDED_DIRECTORIES)) + ->setRules([ + 'phpdoc_indent' => true, + 'phpdoc_order' => ['order' => ['param', 'return', 'throws']], + 'phpdoc_separation' => true, + 'phpdoc_trim' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_scalar' => true, + 'phpdoc_types' => true, + 'phpdoc_to_comment' => false, + 'phpdoc_add_missing_param_annotation' => true, + ]); diff --git a/composer.json b/composer.json index 7267fc1..aa159cd 100644 --- a/composer.json +++ b/composer.json @@ -62,10 +62,10 @@ "allow-plugins": { "ergebnis/composer-normalize": true, "fast-forward/dev-tools": true, + "llm/skills": true, "phpdocumentor/shim": true, "phpro/grumphp-shim": true, - "pyrech/composer-changelogs": true, - "llm/skills": true + "pyrech/composer-changelogs": true }, "platform": { "php": "8.3.0" diff --git a/skills.json b/skills.json index 386ea94..47b322e 100644 --- a/skills.json +++ b/skills.json @@ -1,21 +1,27 @@ { - "$schema": "https://raw.githubusercontent.com/roxblnfk/skills/master/resources/skills.schema.json", + "$schema": "https://raw.githubusercontent.com/roxblnfk/skills/1.15.0/resources/skills.schema.json", "target": ".agents/skills", "aliases": [], "discovery": false, "auto-sync": true, "vendor-sources": false, "dependencies": { - "composer": false + "composer": { + "trusted": [ + "fast-forward/*" + ], + "trusted-replace": true + } }, "sources": [ + { + "from": "dir", + "path": "resources/skills" + }, { "from": "github", "package": "php-fast-forward/changelog", - "ref": "^0.3.0", - "skills": [ - "fast-forward-changelog" - ] + "ref": "^0.4.0" } ] } From d9b1072da96b6a58a1fa7581bbb6ae94cbf8750c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Sun, 25 Oct 2026 00:06:11 -0300 Subject: [PATCH 2/2] fix: satisfy full quality checks without bypasses --- src/Calendar/Quarter.php | 2 -- src/Calendar/Semester.php | 4 ---- src/Sort/ComparisonResult.php | 2 -- src/StateMachine/InvalidTransitionException.php | 2 -- src/Trait/HasNameLookup.php | 4 ---- 5 files changed, 14 deletions(-) diff --git a/src/Calendar/Quarter.php b/src/Calendar/Quarter.php index 3d7d373..a7c5192 100644 --- a/src/Calendar/Quarter.php +++ b/src/Calendar/Quarter.php @@ -107,8 +107,6 @@ public static function ordered(): array /** * @param Month $month - * - * @return self */ public static function fromMonth(Month $month): self { diff --git a/src/Calendar/Semester.php b/src/Calendar/Semester.php index 4e1b2c0..ff2c558 100644 --- a/src/Calendar/Semester.php +++ b/src/Calendar/Semester.php @@ -111,8 +111,6 @@ public function includes(Month $month): bool /** * @param Month $month - * - * @return self */ public static function fromMonth(Month $month): self { @@ -121,8 +119,6 @@ public static function fromMonth(Month $month): self /** * @param Quarter $quarter - * - * @return self */ public static function fromQuarter(Quarter $quarter): self { diff --git a/src/Sort/ComparisonResult.php b/src/Sort/ComparisonResult.php index aac5175..9754476 100644 --- a/src/Sort/ComparisonResult.php +++ b/src/Sort/ComparisonResult.php @@ -38,8 +38,6 @@ enum ComparisonResult implements ReversibleInterface /** * @param int $result - * - * @return self */ public static function fromComparisonResult(int $result): self { diff --git a/src/StateMachine/InvalidTransitionException.php b/src/StateMachine/InvalidTransitionException.php index 9aa7046..bc6695f 100644 --- a/src/StateMachine/InvalidTransitionException.php +++ b/src/StateMachine/InvalidTransitionException.php @@ -26,8 +26,6 @@ final class InvalidTransitionException extends DomainException /** * @param UnitEnum $from * @param UnitEnum $to - * - * @return self */ public static function between(UnitEnum $from, UnitEnum $to): self { diff --git a/src/Trait/HasNameLookup.php b/src/Trait/HasNameLookup.php index ba2bfc6..a14aad7 100644 --- a/src/Trait/HasNameLookup.php +++ b/src/Trait/HasNameLookup.php @@ -24,8 +24,6 @@ trait HasNameLookup { /** * @param string $name - * - * @return self|null */ public static function tryFromName(string $name): ?self { @@ -37,8 +35,6 @@ public static function tryFromName(string $name): ?self /** * @param string $name - * - * @return self */ public static function fromName(string $name): self {