diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 7e46dba..71a6490 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,4 +1,4 @@ -# webware/skeleton — Copilot Agent Instructions +# webware/webware-validator — Copilot Agent Instructions ## Read this before acting — fleet working agreements diff --git a/README.md b/README.md index d134fe5..d4da0ce 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,15 @@ -# webware/skeleton +# webware/webware-validator -Greenfield starter for Webware packages: the shared tooling config, the organization's -required CI workflow contract, and a containerized dev environment — so a new component -starts aligned instead of being retrofitted. +[![PHP Version](https://img.shields.io/packagist/php-v/webware/webware-validator)](https://packagist.org/packages/webware/webware-validator) +[![Latest Version](https://img.shields.io/packagist/v/webware/webware-validator)](https://packagist.org/packages/webware/webware-validator) +[![License](https://img.shields.io/github/license/webinertia/webware-validator)](LICENSE) +[![Required CI](https://github.com/webinertia/webware-validator/actions/workflows/required/webinertia/.github/.github/workflows/org-required-ci.yml/badge.svg)](https://github.com/webinertia/webware-validator/actions/workflows/required/webinertia/.github/.github/workflows/org-required-ci.yml) +[![codecov](https://codecov.io/gh/webinertia/webware-validator/graph/badge.svg)](https://codecov.io/gh/webinertia/webware-validator) +[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fwebinertia%2Fwebware-validator%2F1.0.x)](https://dashboard.stryker-mutator.io/reports/github.com/webinertia/webware-validator/1.0.x) -> **The badges are fenced deliberately.** Un-fence the block below, replace every -> placeholder with the derived repository's own coordinates, and delete this note. -> Nothing should advertise a workflow, a package or a report that does not exist yet. - -```markdown -[![PHP Version](https://img.shields.io/packagist/php-v/OWNER/PACKAGE)](https://packagist.org/packages/OWNER/PACKAGE) -[![Latest Version](https://img.shields.io/packagist/v/OWNER/PACKAGE)](https://packagist.org/packages/OWNER/PACKAGE) -[![License](https://img.shields.io/github/license/ORG/REPO)](LICENSE) -[![Required CI](https://github.com/ORG/REPO/actions/workflows/required/webinertia/.github/.github/workflows/org-required-ci.yml/badge.svg)](https://github.com/ORG/REPO/actions/workflows/required/webinertia/.github/.github/workflows/org-required-ci.yml) -[![codecov](https://codecov.io/gh/ORG/REPO/graph/badge.svg)](https://codecov.io/gh/ORG/REPO) -[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FORG%2FREPO%2FDEFAULT_BRANCH)](https://dashboard.stryker-mutator.io/reports/github.com/ORG/REPO/DEFAULT_BRANCH) -``` - -Placeholders: `OWNER/PACKAGE` is the Packagist name, `ORG/REPO` the GitHub -coordinates, `DEFAULT_BRANCH` the default branch. +Configurable validators for the Webware component stack. Validator classes live in `src/` +and are wired into a consumer's container through the `ConfigProvider` declared under +`extra.laminas.config-provider` in `composer.json`. ## What ships here @@ -40,33 +31,6 @@ byte-identical to the canonical artifacts in `webware-tools/presets/webware-alignment/artifacts/` — copy updates from there rather than editing them here. -## Using this template - -Work the list top to bottom; the namespace rename is the one that bites, because -`extra.laminas.config-provider` is a plain string that no tool validates for you. - -- [ ] `composer.json` — `name`, `description`, `keywords` -- [ ] `composer.json` — `extra.laminas.config-provider` → the new FQCN -- [ ] `composer.json` — both PSR-4 roots: `Webware\Skeleton\` → `src/` and the two `WebwareTest*` roots -- [ ] `src/`, `test/unit/`, `test/integration/` — namespaces and `use` statements -- [ ] Every new file's header block — "This file is part of the Webware Skeleton package" -- [ ] `.github/copilot-instructions.md` — the title line -- [ ] `README.md` — this title, the description, and the fenced badge block (un-fence it, replace the placeholders) -- [ ] `LICENSE` — copyright holder and year -- [ ] `webware-ci.json` — `min_msi` / `min_covered_msi` (see below), and uncomment the `db_*` keys for a package whose tests need a database -- [ ] Default branch — a new repo starts on an `N.N.x` branch (this one is `1.0.x`) - -The full badge block sits at the top of this file, fenced. Un-fence it and replace the -`OWNER/PACKAGE`, `ORG/REPO` and `DEFAULT_BRANCH` placeholders there rather than adding a -second copy here. - -The Stryker badge embeds the branch segment — update it in both the badge URL and the -dashboard link whenever the default branch changes. - -**Do not point the CI badge at `continuous-integration.yml`.** A consumer repository has no -such file, so that URL 404s. The required-route URL above is the one GitHub's own "Create -status badge" dialog produces, because the workflow file lives in the config repository. - ## Quality gates Both MSI gates are set to **95** — the ecosystem standard, not a starting point. Lower them diff --git a/composer.json b/composer.json index f457c97..083b99e 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,11 @@ { - "name": "webware/skeleton", - "description": "Greenfield starter for Webware packages: shared tooling config, the organization's required CI workflow contract, and a containerized dev environment.", + "name": "webware/webware-validator", + "description": "Configurable validators for the Webware component stack.", "license": "BSD-3-Clause", "keywords": [ "webware", "mezzio", - "skeleton" + "validator" ], "authors": [ { @@ -16,7 +16,7 @@ ], "extra": { "laminas": { - "config-provider": "Webware\\Skeleton\\ConfigProvider" + "config-provider": "Webware\\Validator\\ConfigProvider" } }, "require": { @@ -29,17 +29,17 @@ "phpunit/phpunit": "^13.3", "roave/backward-compatibility-check": "^8.21.0", "roave/security-advisories": "dev-master", - "webware/webware-tools": "^1.0.0-beta.3" + "webware/webware-tools": "^1.0.0-beta.8" }, "autoload": { "psr-4": { - "Webware\\Skeleton\\": "src/" + "Webware\\Validator\\": "src/" } }, "autoload-dev": { "psr-4": { - "WebwareTest\\Skeleton\\": "test/unit/", - "WebwareTestIntegration\\Skeleton\\": "test/integration/" + "WebwareTest\\Validator\\": "test/unit/", + "WebwareTestIntegration\\Validator\\": "test/integration/" } }, "minimum-stability": "dev", diff --git a/composer.lock b/composer.lock index c2d8feb..81fccbb 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": "cd5ddc70131332392f81310ba8f8f65e", + "content-hash": "ddc643686c50bf2211d904872c489a3b", "packages": [ { "name": "psr/container", @@ -9344,16 +9344,16 @@ }, { "name": "webware/webware-tools", - "version": "1.0.0-beta.5", + "version": "1.0.0-beta.8", "source": { "type": "git", "url": "https://github.com/webinertia/webware-tools.git", - "reference": "fa188188a6a755e91ea1bac9c9f22cda6b7b019c" + "reference": "62915c9befc68458bb9140bbc419a1e6d33aad01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webinertia/webware-tools/zipball/fa188188a6a755e91ea1bac9c9f22cda6b7b019c", - "reference": "fa188188a6a755e91ea1bac9c9f22cda6b7b019c", + "url": "https://api.github.com/repos/webinertia/webware-tools/zipball/62915c9befc68458bb9140bbc419a1e6d33aad01", + "reference": "62915c9befc68458bb9140bbc419a1e6d33aad01", "shasum": "" }, "require": { @@ -9382,9 +9382,9 @@ ], "support": { "issues": "https://github.com/webinertia/webware-tools/issues", - "source": "https://github.com/webinertia/webware-tools/tree/1.0.0-beta.5" + "source": "https://github.com/webinertia/webware-tools/tree/1.0.0-beta.8" }, - "time": "2026-09-26T22:50:13+00:00" + "time": "2026-10-02T22:00:36+00:00" } ], "aliases": [], diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index e8662fa..7b43513 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * This file is part of the Webware Skeleton package. + * This file is part of the Webware Validator package. * * Copyright (c) 2026 Joey Smith * and contributors. @@ -12,7 +12,7 @@ * file that was distributed with this source code. */ -namespace Webware\Skeleton; +namespace Webware\Validator; /** * Wiring entry point for the package. diff --git a/test/integration/ConfigProviderWiringTest.php b/test/integration/ConfigProviderWiringTest.php index 69ce759..85bc998 100644 --- a/test/integration/ConfigProviderWiringTest.php +++ b/test/integration/ConfigProviderWiringTest.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * This file is part of the Webware Skeleton package. + * This file is part of the Webware Validator package. * * Copyright (c) 2026 Joey Smith * and contributors. @@ -12,13 +12,13 @@ * file that was distributed with this source code. */ -namespace WebwareTestIntegration\Skeleton; +namespace WebwareTestIntegration\Validator; use JsonException; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; -use Webware\Skeleton\ConfigProvider; +use Webware\Validator\ConfigProvider; use function file_get_contents; use function json_decode; diff --git a/test/unit/ConfigProviderTest.php b/test/unit/ConfigProviderTest.php index 9732479..c8ca068 100644 --- a/test/unit/ConfigProviderTest.php +++ b/test/unit/ConfigProviderTest.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * This file is part of the Webware Skeleton package. + * This file is part of the Webware Validator package. * * Copyright (c) 2026 Joey Smith * and contributors. @@ -12,18 +12,29 @@ * file that was distributed with this source code. */ -namespace WebwareTest\Skeleton; +namespace WebwareTest\Validator; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversMethod; use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; -use Webware\Skeleton\ConfigProvider; +use Webware\Validator\ConfigProvider; #[CoversClass(ConfigProvider::class)] #[CoversMethod(ConfigProvider::class, '__invoke')] +#[CoversMethod(ConfigProvider::class, 'getDependencies')] final class ConfigProviderTest extends TestCase { + #[Test] + public function exposesItsDependencyFactoryMapPublicly(): void + { + $expected = [ + 'factories' => [], + ]; + + self::assertSame($expected, new ConfigProvider()->getDependencies()); + } + #[Test] public function providesAnEmptyDependencyFactoryMap(): void {