knplabs/phpspec-welldone-extension
A PhpSpec extension that adds a bit of encouragement to your test runs: when the whole suite passes, it prints a congratulatory "well done" message instead of leaving you with plain green output. Small, drop-in composer package that hooks into PhpSpec's event system to celebrate successful...
Test-debt prioritization: the one real use case. The package answers exactly one question — which classes in this codebase have no PhpSpec specification file at all? That is a coverage-adjacent inventory signal, not a quality signal. It supports decisions like "which module do we backfill specs for during the hardening sprint" or "is our spec suite keeping pace with the classes we keep adding." It does not tell you whether existing specs are good, whether methods are exercised, or whether the code is risky.
Build vs. buy — and the answer is build. This is the clearest decision the package informs, and it resolves against adoption. It is archived, has 6 stars, 0 dependents, and a score of 0.08. The underlying logic is a small scanner: enumerate PSR-4 source classes, map each to its expected spec path, diff, print the remainder. Engineering can reproduce it in a day or two as an internal Composer script or Artisan command. So the decision this package actually drives is "write the ~150-line internal report," not "add a dependency."
Roadmap input for a spec-gap visibility feature. If raising test coverage on a legacy PHP/Laravel service is on the roadmap, this package is a reference implementation for the report shape a stakeholder would want: class list, missing-spec count, trend per sprint. Treat it as a prototype sketch, not a platform choice.
Toolchain standardization. Adoption implicitly commits the team to PhpSpec. For a Laravel codebase in 2024+, that is a step away from the default (PHPUnit/Pest, which ships with Laravel and has first-class php artisan test support). So evaluating this package is really a prompt to re-decide "is PhpSpec our spec tool at all?" — a roadmap-level call, not a feature-level one.
Onboarding and legacy audits. A one-off run against an inherited codebase produces a defensible inventory of unspecified surface area for a handover doc, technical due-diligence pack, or acquisition review. Cheap and useful once.
Explicitly not supported: line/branch coverage, mutation testing, PR diff-coverage, production risk scoring, or any runtime/business-logic decision. This is dev-only tooling with no product-facing surface and no Laravel integration beyond "it's a PHP package that can sit in require-dev."
Consider it only when all of the following hold:
Look elsewhere when:
arch expectations) or Laravel's own testing tooling. PhpSpec's ecosystem momentum is gone.phpunit --coverage-text / Clover plus your CI provider. That is the maintained answer, and Laravel gives it to you out of the box.infection for mutation testing give far higher-signal answers to "where is our risk?"To executives (one paragraph): This is a small, free, MIT-licensed developer tool that lists which PHP classes lack a specification file. It is archived and unmaintained, with essentially no adoption (6 stars, 0 dependents), so we should not take it on as a dependency. Its value to us is conceptual: it demonstrates the exact report we'd want when asking "how much of this service is actually specified?" If we want that visibility — and it's worth having on the legacy service — engineering can reproduce it internally in a day or two, on tooling we already maintain, with no long-term support obligation. Recommendation: do not adopt; consider a short internal spike if test-debt visibility is on the roadmap. Low cost, low risk, low urgency.
To engineering leadership: The underlying idea is sound and cheap — reflect over the source namespace, enumerate classes, diff against discovered spec classes, emit a gap list. The package itself is a dead end: archived, no PHP-version management, zero downstream users to absorb maintenance. Treat it as a reference design. If we want this signal, we implement it as an internal Composer dev-script or Artisan command and wire it to a dashboard. That also lets us target PHPUnit/Pest rather than locking ourselves to PhpSpec — which matters especially on Laravel, where PHPUnit/Pest is the default and PhpSpec would be a deliberate step sideways. Budget: a spike, not a project.
To the engineering team: Don't add it to composer.json. Read the source, copy the approach, and build the gap report as an internal Artisan or Composer command with a scheduled run and a trend chart. That gives us the same insight with an owner, a support path, and no archived-dependency finding in our next security review. Guard against the quiet failure mode: misconfigured source paths or naming-convention drift can make the tool report "all clear" while under-reporting gaps — keep a known-gap fixture it must always flag, and spot-check manually each cycle. If we're on PHPUnit/Pest, native coverage reporting already does more, with active maintenance.
How can I help you explore Laravel packages today?