# phpspec/phpspec

SpecBDD Framework for PHP

Repository: https://github.com/phpspec/phpspec
Canonical: https://ross.abutalabs.com/products/phpspec
Homepage: http://www.phpspec.net
Language: PHP
License: NOASSERTION
License Family: other
Topics: hacktoberfest
Last push: 2026-08-08T10:31:55+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 79, longevity 100
- inputs: {"age_days": 5627, "days_push": 25, "days_rel": 60, "gap_med": 81, "n_releases_24m": 6}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1905, forks 287 (observed 2026-08-28T04:05:51.910309+00:00)

## What it is
phpspec is a SpecBDD (Specification-based Behavior-Driven Development) testing framework for PHP. It guides developers to design and specify object behavior through executable specifications rather than traditional tests.

## Use cases
- write behavior-driven specs for PHP classes
- test-driven design of PHP objects
- run executable specifications instead of unit tests
- mock and stub dependencies in PHP tests
- adopt BDD workflow in a PHP project

## When to choose
- you want SpecBDD-style development in PHP
- you prefer designing objects through specifications
- you need built-in mocking tailored to spec workflows

## When to avoid
- you want conventional unit testing with PHPUnit
- your project is not PHP-based
- you need end-to-end browser testing

## Facets
- artifact type: framework
- maturity: active
- function: testing, e2e-testing, mocking
- domain: testing, developer-tools
- platform: php, cli, cross-platform
- tags: bdd, specbdd, specification, php, tdd, unit-testing

## Member repositories
- phpspec/phpspec (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:51.910309+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:11:43.767389+00:00, confidence not recorded.
  - readme: https://github.com/phpspec/phpspec (fetched 2026-08-28T04:05:51.910309+00:00, sha d4aef1ec8eb8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
