zenstruck/assert
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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| beberlei/assert | 0.83 | 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,426 | 2,457 | 186 | 2M | 29 | 37.1 | 54.3 | NOASSERTION | 1 year ago | |
| atournayre/assert | 0.82 | — | 0 | 0 | 0 | 15 | 1 | 1.3 | 16.6 | MIT | 2 years ago | |
| testo/assert | 0.82 | Assertion plugin for the Testo PHP testing framework. Adds a fluent assert/expect facade, expectation lifecycle, and helpers for matching thrown exceptions. Reports comparisons through Testo’s standard pipeline. Install via Composer: testo/assert. | 0 | 0 | 0 | 2K | 0 | 0.0 | 43.6 | — | — | |
| codeception/lib-asserts | 0.81 | 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 | 19.9 | 61.8 | MIT | 3 months ago | |
| zenstruck/console-test | 0.81 | Test your Symfony Console commands with ease. zenstruck/console-test provides a lightweight harness to run commands, feed input, capture output, and assert exit codes and messages—ideal for fast, reliable unit/integration tests without booting full apps. | 57 | 57 | 8 | 39K | 2 | 15.2 | 42.4 | MIT | 6 months ago | |
| bovigo/assert | 0.80 | Functional-style assertions for PHP unit tests. Use assertThat(value, predicate[, description]) for readable checks with helpful failure messages. Integrates with PHPUnit via AssertionFailure extending AssertionFailedError. Requires PHP 8.3+. | 13 | 13 | 6 | 809 | 1 | 19.4 | 26.9 | BSD-3-Clause | 6 months ago | |
| webmozart/assert | 0.79 | Lightweight PHP assertion library for validating method input/output. Provides fast, readable checks via Webmozart\Assert\Assert with consistent error-message placeholders, throwing InvalidArgumentException on failure. Ideal for safer, less repetitive validation code. | 7,650 | 7,718 | 161 | 12M | 23 | 64.8 | 60.4 | MIT | 2 weeks ago |
How can I help you explore Laravel packages today?