beberlei/assert
Thin assertion library for use in libraries and business-model observed · 2026-08-28
Health v2 · maintenance only
78/100
- Activity 86
- Release rhythm 55
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 588
- age_days: 5218
- days_rel: 84
- days_push: 84
- n_releases_24m: 2
Adoption not part of the score
2432 stars · 187 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A thin PHP assertion library providing assertions and guard methods for input validation in business models, libraries, and low-level application code. Failed assertions throw exceptions, eliminating the need for verbose if-clause validation code.
Use cases
- validate function arguments in php
- assert preconditions in business model
- throw exception on invalid input instead of if checks
- guard methods for library input validation
- check file exists and value is digit in php
- lightweight alternative to symfony validator
When to choose
- you need fast, low-level, dependency-free input assertions in PHP
- you want exception-based validation without instantiating validator objects
- you are writing business-model or library code needing pre/post-condition checks
When to avoid
- you need filtering or sanitization, not just validation
- you need localized validation messages or complex validation rules
- you are not working in PHP
Facets
library · maturity stable
testing error-handling developer-tools web-development backend php assertions input-validation guard-clauses preconditions php-library
1 source
- readme: https://github.com/beberlei/assert · fetched 2026-08-28 · 0bd44a16072d
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| beberlei/assert | main | 78 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem