FindSoftware

webmozart/assert

PHP library of assertions that validate method input and output with readable error messages.

webmozart/assert is a PHP library of assertions for checking the input and output of methods. Each assertion throws an exception when it fails, and a custom message can use a placeholder for the tested value, with the same placeholder order for every assertion. The README says the library is heavily inspired by beberlei/assert and fixes a usability issue with that package’s error messages.

Identity

Status
Active
Maintainer
Bernhard Schussek4
First release
20153

Rendering and deploy

Install with
composer6

Releases

Current major version
28
Last release
2026-11-158

Adoption

GitHub stars
7,6481
Packagist downloads
1,011,654,9247
Contributors
889
Packagist downloads a month
25,323,6337
Dependent repositories
528,99310
Dependent packages
1,00710

Why these figures do not compare

Sources

  1. 2026-11-17: links, Written in, GitHub stars
    api.github.com/repos/webmozarts/assert
  2. 2026-11-17: links
    github.com/webmozarts/assert/blob/master/README.md
  3. 2026-11-17: First release
    repo.packagist.org/p2/webmozart/assert.json
  4. 2026-11-17: Maintainer, License
    raw.githubusercontent.com/webmozarts/assert/master/LICENSE
  5. 2026-11-17: Runtime, Minimum runtime
    raw.githubusercontent.com/webmozarts/assert/2.5.1/composer.json
  6. 2026-11-17: Categories, Install with
    raw.githubusercontent.com/webmozarts/assert/master/README.md
  7. 2026-11-17: Packagist downloads, Packagist downloads a month
    packagist.org/packages/webmozart/assert.json
  8. 2026-11-17: Current major version, Last release
    api.github.com/repos/webmozarts/assert/releases?per_page=100
  9. 2026-11-17: Contributors
    api.github.com/repos/webmozarts/assert/contributors?per_page=1
  10. 2026-11-17: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/packagist.org/packages/webmozart%2Fassert

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON