Skip to content
CAI
Produce a survey ↗Verify a survey

phpspec/prophecy

This system is a PHP library for creating and managing test doubles (mocks and stubs) within the Prophecy testing framework. It provides a comprehensive set of argument matching tokens to verify method calls and return values, alongside a robust class generation engine that supports modern PHP type systems, including union and intersection types. The library also includes custom comparators and exception handling to facilitate reliable and expressive unit testing.

56.7

Adequate · 2 August 2026

7.7k

lines of production code

PHP

primary language

6

bus factor · 137 authors in all

3

measurements over time

CAI band scale
CAI trend line

How it got here

2013 · Modern PHP and PHPSpec migration

This period focused on modernizing the Prophecy library for PHP 8.2+ and migrating the test suite to the latest PHPSpec version. The work involved refactoring the internal type system, adding new argument matching tokens, and updating exception handling to support modern PHP features like union types and the Throwable interface.

29 changes

2015–2023 · Prophecy comparator and PHP 8+ type system support

This period focused on enhancing the Prophecy library's handling of modern PHP features and improving test coverage. Key changes included adding custom comparators for closures and Prophecy objects, integrating PHP 8+ type system fixtures, and expanding test suites for the Doubler and Comparator components.

10 changes

CAI lens gauges

Survey your own repository

phpspec/prophecy was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point the surveyor at a repository you know and see whether you agree with it.

Survey a repository

About this page

  • The description of this project is derived from its own commit history, not from its README.
  • The score is its highest published measurement, taken on 2 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 09c2e5949d — the exact code this score is about.
  • Scored under rubric rubric-2026.08.18. Score the same commit under that rubric and you get the same number.
CAI link cards