Skip to content

Comments

Document supported assertions, prefixes, and chain API in README#81

Merged
ondrejmirtes merged 1 commit into2.0.xfrom
readme-document-supported-features
Feb 19, 2026
Merged

Document supported assertions, prefixes, and chain API in README#81
ondrejmirtes merged 1 commit into2.0.xfrom
readme-document-supported-features

Conversation

@phpstan-bot
Copy link

Summary

  • Added a "Supported Assertions" section listing all 28 assertion methods that the extension understands for type narrowing
  • Documented nullOr* prefix support for nullable type narrowing
  • Documented all* and allNot* prefix support for array/iterable item type narrowing
  • Documented the fluent chain API (Assert::that(), ->nullOr(), ->all(), Assert::thatNullOr(), Assert::thatAll())
  • Documented the function-style API (Assert\that(), Assert\thatNullOr(), Assert\thatAll())

Test plan

  • Verified all listed assertions match AssertHelper::getExpressionResolvers() in source
  • Verified prefix and chain behavior matches test fixtures in tests/Type/BeberleiAssert/data/data.php
  • No code changes, README-only update

🤖 Generated with Claude Code

The README only showed a basic example with Assertion::integer().
Added a "Supported Assertions" section covering:
- All 28 supported assertion methods
- nullOr* prefix for nullable type narrowing
- all* and allNot* prefixes for array/iterable narrowing
- Fluent chain API (Assert::that(), ->nullOr(), ->all())
- Function-style API (Assert\that(), Assert\thatNullOr(), Assert\thatAll())

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ondrejmirtes ondrejmirtes merged commit 27cdc45 into 2.0.x Feb 19, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants