Skip to content

Releases: NexusPHP/assert

v1.1.1

Choose a tag to compare

@paulbalandan paulbalandan released this 11 May 09:33
Immutable release. Only release title and notes can be modified.
v1.1.1
c7066cf

Fixed

  • Preserved list<>, non-empty-list<>, and non-empty-array<> shapes when narrowing through keys() / values(); previously the rebuilt iterable lost its accessory wrappers (e.g. list<mixed> downgraded to array<int<0, max>, mixed>)

Full Changelog: v1.1.0...v1.1.1

v1.1.0

Choose a tag to compare

@paulbalandan paulbalandan released this 11 May 08:57
Immutable release. Only release title and notes can be modified.
v1.1.0
362d881

Added

  • keys() and values() iterating expectations to apply assertions across an iterable's keys or values
  • isBetween(float|int $min, float|int $max, bool $inclusive = true) expectation for numeric range checks
  • isOneOf(non-empty-list<mixed> $choices) expectation, with PHPStan narrowing to the union of literal allowed values when the list is constant
  • hasMinLength(int<1, max> $min) and hasMaxLength(int<1, max> $max) expectations for bounded-string checks
  • isUrl() expectation, backed by filter_var($value, FILTER_VALIDATE_URL)

Fixed

  • Improved failure-message wording for iterating expectations (keys(), values()) to clearly indicate which key or value triggered the failure

Full Changelog: v1.0.0...v1.1.0

v1.0.0

Choose a tag to compare

@paulbalandan paulbalandan released this 14 Mar 17:15
Immutable release. Only release title and notes can be modified.
v1.0.0
8961085

Added

  • Initial release of Nexus Assert library
  • Chainable type-safety assertions API
  • Dynamic method return type extensions for PHPStan support
  • Type inference for fluent assertions
  • Support for PHP 8.2+

New Contributors

Full Changelog: https://github.com/NexusPHP/assert/commits/v1.0.0