NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #99 most downloaded on Packagist
Assertions to validate method input/output with nice error messages.
Latest stable
2.5.1
Last release 7 days ago
15 Nov 2026
Release timing varies
gaps range from 9 days to 4 months
Nearly every release is documented
notes for 31 of 31 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
33 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
keysExist, and the nullOrKeysExist, allKeysExist, and allNullOrKeysExist variants.propertyExists now preserves class-string and object types through its return value, improving static analysis support.Your coding agent can read these notes before it upgrades. Set up the MCP server →
See change log for changes.
See change log for changes.
uuid assertion to prevent braces and prefixes being inside the value.See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
uniqueValues.string|callable for the message.See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
isList type documentation.isAOf, isInstanceOf, etc type documentation.See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
@param declaration for isMap.See change log for changes.
See change log for changes.
isTraversable, use isIterable or isInstanceOf instead.declare(strict_types=1) to all classes.notInArray and notOneOf.isInitialized, to check if a class property is initialized.negativeInteger and notNegativeIntegerisStatic and notStaticSee change log for changes.
See change log for changes.
### Fixed - Exclude tools from export.
Corrected messages and typos in various assertions.
void return type.See change log for changes.
See change log for changes.
allNullOr* methods, with @psalm-assert annotations, for better Psalm support.__callStaticisList will now deal correctly with (modified) lists that contain NaNreportInvalidArgument now has a return type of never.symfony/polyfill-ctype as a dependency, and require ext-ctype instead.
symfony/polyfill-ctype in your project if you need it, as it provides ext-ctypeSee change log for changes.
See change log for changes.
Webmozart\Assert\InvalidArgumentExceptionAssert::positiveInteger()all*() and nullOr*() methods to improve psalm compatibility.See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
all* & nullOr* methods@psalm-pure annotation to Assert::notFalse()@psalm-assert annotations where appropriateSee change log for changes.
See change log for changes.
Assert::notStartsWith()Assert::notEndsWith()Assert::inArray()@psalm-pure annotations to pure assertionsDateTime(Immutable) objects now display their date & time.Assert::count() now use the values to render the exception message.See change log for changes.
See change log for changes.
Assert::notFalse()Assert::isAOf()Assert::isAnyOf()Assert::isNotA()See change log for changes.
See change log for changes.
Assert::validArrayKey()Assert::isNonEmptyList()Assert::isNonEmptyMap()@throws InvalidArgumentException annotations to all methods that throw.@psalm-assert for the list type to the isList assertion.ResourceBundle & SimpleXMLElement now pass the isCountable assertions.
They are countable, without implementing the Countable interface.range now has the proper variables.isList and isMap. As it is a valid form of both.
If a non-empty variant is needed, use isNonEmptyList or isNonEmptyMap.See change log for changes.
See change log for changes.
Assert::uniqueValues()Assert::unicodeLetters()Assert::email()@psalm-assert annotations where appropriate.Assert::endsWith() would not give the correct result when dealing with a multibyte suffix.Assert::length(), minLength, maxLength, lengthBetween would not give the correct result when dealing with multibyte characters.NOTE: These 2 changes may break your assertions if you relied on the fact that multibyte characters didn't behave correctly.
Assert::isTraversable() in favor of Assert::isIterable()
trigger_error. It is now annotated as well.See change log for changes.
See change log for changes.
Assert::ip()Assert::ipv4()Assert::ipv6()Assert::notRegex()Assert::interfaceExists()Assert::isList()Assert::isMap()__toString()See change log for changes.
See change log for changes.
Assert::minCount()Assert::maxCount()Assert::countBetween()Assert::isCountable()Assert::notWhitespaceOnly()Assert::natural()Assert::notContains()Assert::isArrayAccessible()Assert::isInstanceOfAny()Assert::isIterable()stringNotEmpty will no longer report "0" is an empty stringAssert::isTraversable() in favor of Assert::isIterable()added extension point Assert::reportInvalidArgument() for custom subclasses
Assert::throws()Assert::count()Assert::reportInvalidArgument() for custom subclassesadded Assert::propertyNotExists()
Assert::object()Assert::propertyExists()Assert::propertyNotExists()Assert::methodExists()Assert::methodNotExists()Assert::uuid()add tests for minimum package dependencies on Travis CI
* added support for PHP 5.3.3
* first stable release
* first beta release
One column per quarter.