This library provides a comprehensive assertion library for PHP 8.4+, enabling robust validation and preconditions for your code.
Requires PHP 8.4+
composer require cline/assert- Getting Started - Introduction to assertions and basic usage
- Expect API - Jest/Pest-style fluent expectations
- String Assertions - String validation and checks
- Numeric Assertions - Number validation and comparisons
- Array Assertions - Array validation and operations
- Type Assertions - Type checking and validation
- Comparison Assertions - Value comparison utilities
- Object Assertions - Object property and method checks
- Boolean Assertions - Boolean value validation
- Null and Empty Assertions - Null and empty checks
- File System Assertions - File and directory validation
- Validation Assertions - Email, URL, and format validation
- Custom Assertions - Creating custom assertion rules
- Lazy Assertions - Batch validation and error collection
- Assertion Chains - Fluent assertion interface
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
The MIT License. Please see License File for more information.