From c03a6c1a6b3919eed38693a1f06b58ca4e5b10d3 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 + .gitignore | 1 + .php-cs-fixer.dist.php | 38 ++++++++++++++++++++++++++ composer.json | 5 ++-- skills.json | 18 ++++++++---- 6 files changed, 66 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 6d27191..876d056 100755 --- a/.gitattributes +++ b/.gitattributes @@ -10,3 +10,4 @@ /.changelog/ export-ignore /CONTRIBUTING.md export-ignore /skills.json export-ignore +/.php-cs-fixer.dist.php export-ignore diff --git a/.gitignore b/.gitignore index 774e249..922fc3b 100755 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ vendor/ composer.lock *.cache /.agents/ +/.dev-tools/ diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..1344036 --- /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/fork + * @see https://github.com/php-fast-forward + * @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 44475be..e84702e 100644 --- a/composer.json +++ b/composer.json @@ -50,10 +50,11 @@ "allow-plugins": { "ergebnis/composer-normalize": true, "fast-forward/dev-tools": true, + "llm/skills": true, "phpdocumentor/shim": true, "phpro/grumphp": true, - "pyrech/composer-changelogs": true, - "llm/skills": true + "phpro/grumphp-shim": 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 2e7fe7bcddb23582799fdbe5527fc0f409ab0632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Sun, 25 Oct 2026 00:04:55 -0300 Subject: [PATCH 2/2] fix: satisfy full quality checks without bypasses --- examples/bootstrap.php | 2 +- src/Worker/Worker.php | 1 + tests/Manager/ForkManagerTest.php | 1 + tests/Worker/WorkerStateTest.php | 1 + tests/Worker/WorkerTest.php | 3 +-- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/bootstrap.php b/examples/bootstrap.php index f874e5f..4294a30 100644 --- a/examples/bootstrap.php +++ b/examples/bootstrap.php @@ -16,7 +16,7 @@ * @see https://datatracker.ietf.org/doc/html/rfc2119 */ -require dirname(__DIR__) . '/vendor/autoload.php'; +require __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/Support/ExampleConsole.php'; require_once __DIR__ . '/Support/ExampleLogger.php'; require_once __DIR__ . '/Support/ExampleRuntime.php'; diff --git a/src/Worker/Worker.php b/src/Worker/Worker.php index 663c4f2..c142762 100644 --- a/src/Worker/Worker.php +++ b/src/Worker/Worker.php @@ -25,6 +25,7 @@ use FastForward\Fork\Signal\Signal; use Psr\Log\LoggerInterface; use Throwable; + use function error_reporting; use function getmypid; use function max; diff --git a/tests/Manager/ForkManagerTest.php b/tests/Manager/ForkManagerTest.php index 1b71f75..5c0ad07 100644 --- a/tests/Manager/ForkManagerTest.php +++ b/tests/Manager/ForkManagerTest.php @@ -36,6 +36,7 @@ use PHPUnit\Framework\Attributes\UsesClass; use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; + use function getmypid; use function pcntl_fork; use function posix_getpid; diff --git a/tests/Worker/WorkerStateTest.php b/tests/Worker/WorkerStateTest.php index 63d5d13..2f763a7 100644 --- a/tests/Worker/WorkerStateTest.php +++ b/tests/Worker/WorkerStateTest.php @@ -27,6 +27,7 @@ use PHPUnit\Framework\Attributes\UsesClass; use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; + use function pcntl_fork; use function pcntl_waitpid; use function posix_kill; diff --git a/tests/Worker/WorkerTest.php b/tests/Worker/WorkerTest.php index afed3e3..71ce542 100644 --- a/tests/Worker/WorkerTest.php +++ b/tests/Worker/WorkerTest.php @@ -39,6 +39,7 @@ use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; use Psr\Log\LoggerInterface; + use function getmypid; use function pcntl_fork; use function pcntl_waitpid; @@ -415,8 +416,6 @@ public static function provideNormalizedExitCodes(): iterable * @param WorkerState $state * @param callable $callback * @param LoggerInterface|null $logger - * - * @return Worker */ private function createWorker( ForkManagerInterface $manager,