webmozart/assert
webmozart/assert is a lightweight PHP assertion library for validating method input/output. It provides many type and value checks via a single Assert class and throws InvalidArgumentException with consistent, readable default error messages (or custom ones).
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| beberlei/assert | 0.85 | Lightweight assertion library for validating method arguments and input data in PHP. Provides a fluent, readable API with many built-in rules (string, numeric, email, UUID, collection, etc.), clear exceptions, and easy extensibility for custom constraints. | 2,428 | 2,459 | 186 | 2M | 29 | 57.1 | 65.9 | NOASSERTION | 1 year ago | |
| zenstruck/assert | 0.83 | Lightweight PHP assertion helpers for cleaner, safer code. zenstruck/assert provides expressive, fluent assertions and value validation with helpful exception messages, improving readability in libraries and Laravel apps without bringing a full testing framework. | 81 | 81 | 5 | 720K | 0 | 25.0 | 64.5 | MIT | 4 months ago | |
| symfony/validator | 0.82 | Symfony Validator component validates values and objects using a constraint-based system inspired by JSR-303 Bean Validation. Supports built-in and custom constraints, rich violation messages, and integration with Symfony forms and frameworks. | 2,684 | 2,741 | 103 | 6M | 0 | 48.6 | 55.0 | MIT | 1 week ago | |
| codeception/lib-asserts | 0.82 | Lightweight assertion library used by Codeception. Provides clear, dependency-free assert helpers for writing expressive tests in PHP, with informative failure messages and easy integration into any PHPUnit-style workflow. | 104 | 104 | 5 | 1M | 1 | 26.5 | 65.0 | MIT | 2 months ago | |
| phpstan/phpstan-webmozart-assert | 0.81 | PHPStan extension for webmozart/assert that teaches PHPStan how Assert::* calls narrow types. Supports many assertions (including nullOr*/all*) so values become non-null, specific scalars, instances, arrays, etc. after validation, improving static analysis accuracy. | 183 | 183 | 33 | 633K | 6 | 32.7 | 60.2 | MIT | 1 year ago |
How can I help you explore Laravel packages today?