Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# webware/skeleton — Copilot Agent Instructions
# webware/webware-validator — Copilot Agent Instructions

## Read this before acting — fleet working agreements

Expand Down
56 changes: 10 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand All @@ -16,7 +16,7 @@
],
"extra": {
"laminas": {
"config-provider": "Webware\\Skeleton\\ConfigProvider"
"config-provider": "Webware\\Validator\\ConfigProvider"
}
},
"require": {
Expand All @@ -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",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

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

4 changes: 2 additions & 2 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <jsmith@webinertia.net>
* and contributors.
Expand All @@ -12,7 +12,7 @@
* file that was distributed with this source code.
*/

namespace Webware\Skeleton;
namespace Webware\Validator;

/**
* Wiring entry point for the package.
Expand Down
6 changes: 3 additions & 3 deletions test/integration/ConfigProviderWiringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <jsmith@webinertia.net>
* and contributors.
Expand All @@ -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;
Expand Down
17 changes: 14 additions & 3 deletions test/unit/ConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <jsmith@webinertia.net>
* and contributors.
Expand All @@ -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
{
Expand Down