Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpstan Webmozart Assert Laravel Package

phpstan/phpstan-webmozart-assert

PHPStan extension for webmozart/assert that teaches PHPStan how Assert::* calls narrow types. Supports many assertions (including nullOr*/all*) so values become non-null, specific scalars, instances, arrays, etc. after validation, improving static analysis accuracy.

View on GitHub
Deep Wiki
Context7
2.0.0
1.2.11
1.2.10
  • be3dcd8 - Improve string asserts that assume some othe property besides being a non-empty-string
1.2.9
  • ae758a2 - Revert "More precise assert type for Assert::integerish methods"
1.2.8
  • e2ee76a - More precise assert type for Assert::integerish methods
1.2.7
  • 923bd58 - Allow to Assert::isInstanceOf() to work with generic and anonymous class strings
  • 983a1a7 - Update lock-closed-issues.yml
  • 1bc5cef - Fix "Call to function array_filter() requires parameter #2 to be passed"
1.2.6
  • c1739d0 - Revert non-empty-array specification for Assert::uniqueValues
1.2.5
  • 0307f23 - Specify non-empty-array for Assert::uniqueValues
  • 0e81610 - Remove list of supported methods, fix typo in PHPStan :)
  • 1dee6dd - Add regression test
  • 4ae9acf - fix: use correct FCQN
  • 2c05860 - Update metcalfc/changelog-generator action to v4.3.1
  • b78f846 - Update cbrgm/mastodon-github-action action to v2
  • 9c08fed - Update metcalfc/changelog-generator action to v4.2.0
  • 59f8a49 - Update dessant/lock-threads action to v5
  • 5e70b90 - Update actions/checkout action to v4
  • 32e001c - Next-gen coding standard workflow
  • 802eb7d - Update dependency slevomat/coding-standard to v8.11.1
  • e88ea0c - Update dependency slevomat/coding-standard to v8.11.0
  • 5766091 - Update build-cs
  • 3fa2bca - Update PHPCS
  • 09dd4b3 - Update metcalfc/changelog-generator action to v4.1.0
1.2.4
  • d1ff286 - Fix handling Assert::isInstanceOf
1.2.3
  • 1e3ff2c - Do not use instanceof *Type
  • 7024c2f - Fix tests
  • 94699e8 - Add phpstan-deprecation-rules
  • 3421893 - Update dependency slevomat/coding-standard to v8.8.0
  • baa3d14 - Require PHPStan 1.10
  • a1dfe1f - Update release-toot.yml
  • 0a55215 - Create release-toot.yml
  • c92d622 - Update dependency slevomat/coding-standard to v8.7.1
  • e6de288 - Update dessant/lock-threads action to v4
  • 98f0829 - Update metcalfc/changelog-generator action to v4
  • 403b3c0 - Update dependency slevomat/coding-standard to v8.6.4
1.2.2
  • 01259f5 - Add test cases for #150
  • 944b629 - Improve all* handling
  • fe8354a - Migrate to new Type::getArrays()
  • a882a6e - Mark support for isEmpty and notEmpty
  • f4f29ab - Add FQCN support to implementsInterface
  • 8a78d5f - Update slevomat/coding-standard to ^8.0
  • beb34cb - Extract bleeding edge tests
  • 8213017 - Support list type
1.2.1
  • c8cd404 - Add original function name to FAUX_FUNCTION to avoid potential clashes
  • 463e931 - Support string assertions resulting in non-empty-string
  • 71d8f08 - Update build.yml
  • 64c0042 - Create tag workflow
  • b67734a - Require PHPStan 1.8.0
  • 724e062 - Fix build error
  • a7d110f - Require PHPStan 1.7.15
1.2.0
  • a7f1295 - Support allNullOr*
  • 08d2db4 - Update dependency slevomat/coding-standard to v7.2.1
  • b0d5930 - Import assertType function in tests
1.1.3
  • 45ee104 - Fix false positives #118, #119, #130
  • a83a4d2 - Update dependency slevomat/coding-standard to v7.2.0
  • d42628c - Adapt for latest phpstan
  • d753a63 - Adapt for latest phpstan
  • 2488d03 - Update dependency slevomat/coding-standard to v7.1
  • 308ee77 - Drop alias
  • 3c69962 - Update workflow
  • 753d16f - Drop support for PHP 7.1, require PHPStan 1.5.0
  • cad8485 - Update dependency slevomat/coding-standard to v7.0.20
1.1.2
  • c293bf4 - Support eq and notEq
  • 426488d - Require PHPStan 1.4.9
  • 0581256 - Add failing test for notSame issue
  • ba4a79a - Add more impossible-check tests for stringNotEmpty
  • 9424683 - Update dependency slevomat/coding-standard to v7.0.19
  • 350d51d - Update actions/checkout action to v3
1.1.1
1.1.0
  • 56d7b27 - Improve all* handling
  • 11cc4ba - Support isNotA
  • 5b5916d - Fix allSubclassOf test case
  • c9b8ddb - Support deprecated isTraversable
  • 3937f41 - Support isAnyOf
  • ceb5414 - Re-use inArray resolver for oneOf since it's an alias
  • d23102b - Run PHPStan with level 9
  • c13ffc1 - Add regression test
  • 9d450a4 - Add regression test
  • d1c78f6 - Support isNonEmptyList and isNonEmptyMap
  • 586d049 - Add regression test
  • af6e2f5 - Refactor BooleanNot usage
  • 0e496ac - Support isInstanceOfAny
  • a46f664 - Support isAOf
  • b9233c3 - Support greater, less and range assertions
  • 086010d - Support isMap, adapt isList to work the same
  • 4fe6508 - Require latest phpstan to fix a couple of things
  • b42bf53 - Update CS
  • bb64184 - Update renovate.json
  • 7bd014c - Update lock-closed-issues.yml
  • fb12ad3 - Update github-actions
  • 7f92a22 - Update metcalfc/changelog-generator action to v1.0.1
  • c24c9c4 - Delete dependabot.yml
  • 4600db3 - Update and rename renovate.json to .github/renovate.json
  • 92966ab - Add renovate.json
1.0.9
  • 895cbf2 - Add more tests
  • 3d51653 - Fix a couple of nullOr* tests
  • 4bd0967 - Bring CS closer to phpstan-src
  • f61bbac - Improve isList
  • ae57b8f - Update phpunit.xml
  • f77d18f - Allow objects in instanceof-like assertions
1.0.8
  • 7a5f53a - Tweet release action
  • 160574e - Update release.yml
  • 0ecb23b - Add regression test for non-empty-string ImpossibleCheckTypeStaticMethodCallRule problems
  • 8e664e7 - Revert "Add support for contains, startsWith, startsWithLetter and endsWith"
  • 67f970c - Revert "Support string assertions resulting in non-empty-string"
1.0.7
  • 19b869e - Add support for contains, startsWith, startsWithLetter and endsWith
1.0.6
  • 9009135 - Support string assertions resulting in non-empty-string
1.0.5
  • 0aa685e - Move type assertion tests into TypeTest
  • 9bdc258 - Extract comparison tests
  • 45b115f - Support keyNotExists
  • baf0436 - Extract remaining collection tests
  • 7db7d85 - Extract remaining tests
  • 11ecf41 - Support remaining array count assertions
1.0.4
1.0.3
  • 0636456 - Composer > Remove --no-suggest
  • d04b381 - Rename conflicting classes
  • 4e2fc5e - Allow Composer plugins in build-cs
  • 42b5926 - Support positiveInteger
  • 0b96b34 - Increase minimum supported webmozart/assert to 1.10
1.0.2
1.0.1
  • f53f3cb - Support validArrayKey
  • 29c8c6c - Complete string length type specifiers
  • 2cd9a91 - Adapt README
1.0.0
  • a1b9607 - Open 1.0-dev
  • a83bf9e - Improve compatibility with PHPStan 1.0
  • 41afc8e - Constrain lowest PHPParser version to 4.13.0
  • d68938d - Improve compatibility with nikic/php-parser 4.13.0
  • 83546e1 - Improve compatibility with PHPStan 1.0
0.12.16
  • 0422ea8 - Add support for interfaceExists
0.12.15
  • 719bc82 - Fix
  • 978e524 - Resolve Assert::minLength($s, 1+) to non-empty-string
0.12.14
  • 9b093e3 - modernise tests
  • 8925bd3 - add support for methodExists and propertyExists
  • c500936 - add support for isArrayAccessible
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport