NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1617 most downloaded on Packagist
A PHPStan rule to detect safety issues. Must be used in conjunction with thecodingmachine/safe
Latest stable
v1.4.7
Last release 5 months ago
21 Jun 2026
Ships unpredictably
gaps range from 4 weeks to 2.9 years
Nearly every release is documented
notes for 16 of 17 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
18 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
ReplaceSafeFunctionsDynamicReturnTypeExtension: fix typo by @staabm in https://github.com/thecodingmachine/phpstan-safe-rule/pull/71
Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v.1.4.5...v1.4.7
Sync preg_match extensions with PHPStan upstream + expose identity-check narrowing bug by @mvhirsch in https://github.com/thecodingmachine/phpstan-saf
preg_match extensions with PHPStan upstream + expose identity-check narrowing bug by @mvhirsch in https://github.com/thecodingmachine/phpstan-safe-rule/pull/65Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.4.3...v1.4.4
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Trigger reflection processing lazily by @kayw-geek, @staabm in https://github.com/thecodingmachine/phpstan-safe-rule/pull/64
Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.4.2...v1.4.3
feat: infer preg_replace_callback return type by @mRoca in https://github.com/thecodingmachine/phpstan-safe-rule/pull/60
preg_replace_callback return type by @mRoca in https://github.com/thecodingmachine/phpstan-safe-rule/pull/60Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.4.1...v1.4.2
Consider named argument flags: JSON_THROW_ON_ERROR for json_ functions as "Safe" by @shish in https://github.com/thecodingmachine/phpstan-safe-rule/pu
JSON_THROW_ON_ERROR for json_ functions as "Safe" by @shish in https://github.com/thecodingmachine/phpstan-safe-rule/pull/56Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.4.0...v1.4.1
Bump phpunit to be less-deprecated by @shish in https://github.com/thecodingmachine/phpstan-safe-rule/pull/49
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)Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.3.1...v1.4.0
Same as v1.3.0, but marked compatible with Safe v3.0.0
Same as v1.3.0, but marked compatible with Safe v3.0.0
This new release brings support for PHPStan 2.0 (and drops support for PHPStan 1.0)
This new release brings support for PHPStan 2.0 (and drops support for PHPStan 1.0)
Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.2.0...v1.3.0
Support safe ^2.0 by @dbrekelmans in https://github.com/thecodingmachine/phpstan-safe-rule/pull/28
Full Changelog: https://github.com/thecodingmachine/phpstan-safe-rule/compare/v1.1.0...v1.2.0
Migrated extension to PHPStan 1.0 #26 (@staabm)
Removing dev files using .gitattribues #20 @Tobion
Changes:
detects usage of "new DateTime" and "new DateTimeImmutable" and proposes using the Safe variant of those classes instead.
New feature:
new DateTime" and "new DateTimeImmutable" and proposes using the Safe variant of those classes instead.is compatible with PHPStan 0.12 (while keeping compatibility with 0.10 and 0.11)
This new version:
Improvements: - #11 #13 Add support for phpstan/extension-installer (thanks to @shadowhand) - #12 Ignore json_decode and json_encode when use JSON_THR
Improvements:
Nothing published for this version
Bugfix release: - #8 Fixing strict version enforced.
Bugfix release:
- #7 Adding compatibility with PHPStan 0.11
This release targets PHPStan 0.10.x and Safe 0.1.x
This release targets PHPStan 0.10.x and Safe 0.1.x
One column per quarter.