# webmozart/assert

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


Source: https://findsoftware.frbit.cloud/webmozart-assert/
Last reviewed: 2026-11-17
Listed since: 2026-11-17

## Record

### Links

- repository: https://github.com/webmozarts/assert
- docs: https://github.com/webmozarts/assert/blob/master/README.md

### Identity

- status: active
- maintainer: Bernhard Schussek
- maintainerType: unknown
- parent: unknown
- firstRelease: 2015
- hqCountry: unknown

### Kind

- category: library
- hosting: php
- language: php
- runtime: php
- runtimeMin: php 8.2
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: not applicable
- renderingModes: not applicable
- installMethod: composer

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 2
- latestReleaseDate: 2026-11-15

### Adoption

- githubStargazers: 7648
- packagistDownloads: 1011654924
- npmWeeklyDownloads: not applicable
- contributors: 88
- pluginCount: unknown
- packagistMonthlyDownloads: 25323633
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 528993
- dependentPackages: 1007

### Sources

- urls: https://api.github.com/repos/webmozarts/assert (read 2026-11-17)
- urls: https://github.com/webmozarts/assert/blob/master/README.md (read 2026-11-17)
- firstRelease: https://repo.packagist.org/p2/webmozart/assert.json (read 2026-11-17)
- maintainer: https://raw.githubusercontent.com/webmozarts/assert/master/LICENSE (read 2026-11-17)
- language: https://api.github.com/repos/webmozarts/assert (read 2026-11-17)
- runtime: https://raw.githubusercontent.com/webmozarts/assert/2.5.1/composer.json (read 2026-11-17)
- runtimeMin: https://raw.githubusercontent.com/webmozarts/assert/2.5.1/composer.json (read 2026-11-17)
- category: https://raw.githubusercontent.com/webmozarts/assert/master/README.md (read 2026-11-17)
- installMethod: https://raw.githubusercontent.com/webmozarts/assert/master/README.md (read 2026-11-17)
- packagistDownloads: https://packagist.org/packages/webmozart/assert.json (read 2026-11-17)
- packagistMonthlyDownloads: https://packagist.org/packages/webmozart/assert.json (read 2026-11-17)
- currentMajor: https://api.github.com/repos/webmozarts/assert/releases?per_page=100 (read 2026-11-17)
- latestReleaseDate: https://api.github.com/repos/webmozarts/assert/releases?per_page=100 (read 2026-11-17)
- githubStargazers: https://api.github.com/repos/webmozarts/assert (read 2026-11-17)
- contributors: https://api.github.com/repos/webmozarts/assert/contributors?per_page=1 (read 2026-11-17)
- license: https://raw.githubusercontent.com/webmozarts/assert/master/LICENSE (read 2026-11-17)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/packagist.org/packages/webmozart%2Fassert (read 2026-11-17)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/packagist.org/packages/webmozart%2Fassert (read 2026-11-17)

## Notes

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.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
