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 Safe Rule Laravel Package

thecodingmachine/phpstan-safe-rule

PHPStan rule set that flags calls to “unsafe” PHP functions that can return false on failure and suggests using the thecodingmachine/safe equivalents that throw exceptions, helping enforce safer, exception-based error handling in your codebase.

View on GitHub
Deep Wiki
Context7
v1.4.1

What's Changed

New Contributors

Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.4.0...v1.4.1

v1.4.0

What's Changed (tl;dr)

  • Drop support for EOL'ed PHP versions - 8.1 is the new minimum
  • Fix "unsafe function" error ID code
  • Port phpstan's special-case support for preg_match so that it also applies to Safe\preg_match (ie, the $matches array is now accurately typed to match the regex pattern used, rather than being a generic ?array)

What's Changed (Full)

New Contributors

Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.3.1...v1.4.0

v1.3.1

Same as v1.3.0, but marked compatible with Safe v3.0.0

v1.3.0

What's Changed

This new release brings support for PHPStan 2.0 (and drops support for PHPStan 1.0)

New Contributors

Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.2.0...v1.3.0

v1.1.0

Improvements

  • Migrated extension to PHPStan 1.0 #26 (@staabm)
v1.0.1

Changes:

  • Removing dev files using .gitattribues #20 @Tobion
  • Adding compatibility with PHP8 #21 @sanmai
v1.0.0

New feature:

  • detects usage of "new DateTime" and "new DateTimeImmutable" and proposes using the Safe variant of those classes instead.
v1.0.0-beta1

This new version:

  • targets Safe 1.0.0-beta1
  • is compatible with PHPStan 0.12 (while keeping compatibility with 0.10 and 0.11)
v0.1.4

Improvements:

  • #11 #13 Add support for phpstan/extension-installer (thanks to @shadowhand)
  • #12 Ignore json_decode and json_encode when use JSON_THROW_ON_ERROR option (thanks to @vkill)
v0.1.3
  • See #10
v0.1.2

Bugfix release:

  • #8 Fixing strict version enforced.
v0.1.1
  • #7 Adding compatibility with PHPStan 0.11
v0.1.0

This release targets PHPStan 0.10.x and Safe 0.1.x

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