ekino/phpstan-banned-code
Detected banned code using PHPStan
v3.2.0
6.5M downloads/mo
#1867 most downloaded on Packagist
ekino/phpstan-banned-code
What this package is like to depend on
Last release 5 months ago
13 Mar 2026
Ships unpredictably
gaps range from 8 days to 2.7 years
Most releases are documented
notes for 11 of 15 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
15 releases · first in 2019
2 releases in the last 12 months
see the full history below
Release timeline
15 releases · Jan 2019 to Mar 2026Releases
latest 15-
v3.2.013 Mar 2026Release notes
Open source →Release notes
Open source →- Revert #79 leading to a BC break and reflects as a strict/opinionated rule
-
v3.1.005 Mar 2026Release notes
Open source →What's Changed
- chore(release) Enable lean releases by @raphaelstolt in #71
- chore(security): replace security checker by composer audit by @vladsolntsev in #74
- chore(tests): move code snippets into functional tests folder by @vladsolntsev in #75
- chore(dependencies): update nikic/php-parser to 5.4 by @vladsolntsev in #76
- chore(dependencies): update phpunit/phpunit to 10.5 by @vladsolntsev in #77
- chore(dependencies): update symfony/var-dumper to 6.4 by @vladsolntsev in #78
- feat(ban): add empty to list of banned functions by @vladsolntsev in #79
- chore(ci): add php 8.4 by @vladsolntsev in #80
- update regex for test namespaces by @simbig in #82
- fix(tests): improve type hinting for Scope in BannedNodesRuleTest and… by @Daric971 in #83
- Revert "fix(tests): improve type hinting for Scope in BannedNodesRuleTest and…" by @Daric971 in #84
- chore(ci): update PHP version in GitHub Actions by @Daric971 in #85
New Contributors
- @raphaelstolt made their first contribution in #71
- @vladsolntsev made their first contribution in #74
- @simbig made their first contribution in #82
Full Changelog: v3.0.0...v3.1.0
Release notes
Open source →- Replace
fabpot/local-php-security-checkerbycomposer auditfor the security check - Move code snippets into tests directory
- Updated nikic/php-parser to 5.4
- Updated phpunit/phpunit to 10.5
- Updated symfony/var-dumper to 6.4
- Added empty() to the list of banned functions
- Added PHP 8.4 and 8.5 to the CI run
- Removed support for PHP 8.1
- Added support for nested namespaces for tests in
BannedUseTestRule
-
v3.0.013 Nov 2024 -
v2.1.014 Aug 2024Release notes
Open source →- Added option to prevent errors to be ignored
- Added error identifiers starting with
ekinoBannedCode.
-
v2.0.001 Aug 2024Release notes
Open source →What's Changed
- fix(composer): fix order by @mremi in #54
- fix(rule): Fix phpstan fail for result of array_column by @BitScout in #55
- feat(ban): Add rule to ban shell execution via backticks by @BitScout in #56
- feat(ban): Add ban on print statements by @BitScout in #57
- fix(composer): allow plugin ergebnis/composer-normalize by @mremi in #58
- Normalize leading backslashes in banned function names by @spawnia in #30
- fix(ci): use sprintf native function by @brociani in #64
New Contributors
Full Changelog: v1.0.0...v2.0.0
Release notes
Open source →- Drop support for PHP ^7.3 || ^8.0, support now only ^8.1
- Force usage of native sprintf function
- Added rule to ban shell execution via backticks
- Added rule to ban print statements
- Allow Composer plugin ergebnis/composer-normalize
- Add Composer keyword for asking user to add this package to require-dev instead of require
- Normalize leading backslashes in banned function names
-
v1.0.002 Nov 2021Release notes
Open source →- Improve PHPStan configuration file
- Updated to PHPStan 1.0
- Updated to PHPUnit 9.5
- Drop support for PHP 7.2
Release notes
Open source →- Improve PHPStan configuration file
- Updated to PHPStan 1.0
- Updated to PHPUnit 9.5
- Drop support for PHP 7.2
-
v0.5.013 Aug 2021 -
v0.4.015 Mar 2021Release notes
Open source →- Drop support for PHP 7.1
- Added support of dd function
- Replaced deprecated localheinz/composer-normalize in favor of ergebnis one
- Allow PHP ^8.0
- Switch to the new security checker
Release notes
Open source →- Drop support for PHP 7.1
- Added support of dd function
- Replaced deprecated localheinz/composer-normalize in favor of ergebnis one
- Allow PHP ^8.0
- Switch to the new security checker
- Upgrade friendsofphp/php-cs-fixer
-
v0.3.117 Jan 2020Release notes
Open source →- Fix deprecated config inside extension.neon file
- Fix tests by adding nikic/php-parser as a required dev dependency
Release notes
Open source →- Fix deprecated config inside extension.neon file
- Fix tests by adding nikic/php-parser as a required dev dependency
-
v0.3.002 Jan 2020 -
v0.2.023 Oct 2019Release notes
Open source →- Enable strict typing
- Add coveralls and badges
- Autoinstall through https://github.com/phpstan/extension-installer
- Apply the BannedNodesRule only to named functions
- Add functional tests with some code snippets that should be detected when running phpstan
-
v0.1.111 Apr 2019Nothing published for this version
-
v0.1.015 Feb 2019Nothing published for this version
-
v0.0.203 Jan 2019Nothing published for this version
-
v0.0.102 Jan 2019Nothing published for this version