PHPackages                             wyrihaximus/phpstan-no-safe - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. wyrihaximus/phpstan-no-safe

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

wyrihaximus/phpstan-no-safe
===========================

⛔🔐 PHPStan extension that detects and blocks any usage of `thecodingmachine/safe`

1.0.0(today)00[1 issues](https://github.com/WyriHaximus/phpstan-no-safe/issues)MITMakefilePHP ^8.4CI passing

Since Jun 20Pushed todayCompare

[ Source](https://github.com/WyriHaximus/phpstan-no-safe)[ Packagist](https://packagist.org/packages/wyrihaximus/phpstan-no-safe)[ GitHub Sponsors](https://github.com/WyriHaximus)[ RSS](/packages/wyrihaximus-phpstan-no-safe/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

PHPStan No Safe
===============

[](#phpstan-no-safe)

PHPStan extension that detects and blocks any usage of [`thecodingmachine/safe`](https://github.com/thecodingmachine/safe)

ReactPHP Extension for PHPStan
==============================

[](#reactphp-extension-for-phpstan)

[![Continuous Integration](https://github.com/WyriHaximus/phpstan-no-safe/workflows/Continuous%20Integration/badge.svg)](https://github.com/WyriHaximus/phpstan-no-safe/workflows/Continuous%20Integration/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/f76d2c1e88e995667b8aca039df15606264ac448e75417ded35493f3c355af42/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7068707374616e2d6e6f2d736166652f762f737461626c652e706e67)](https://packagist.org/packages/WyriHaximus/phpstan-no-safe)[![Total Downloads](https://camo.githubusercontent.com/ba9cfc33ca08b6284fab74a8a348a9ba1b85efc5c7a098c2c0918389b734c796/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7068707374616e2d6e6f2d736166652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/WyriHaximus/phpstan-no-safe)[![License](https://camo.githubusercontent.com/9e56e42549350f6ed962e0f49a920ff5194691830eb6eb7db5e391b1e2acbf93/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7068707374616e2d6e6f2d736166652f6c6963656e73652e706e67)](https://packagist.org/packages/WyriHaximus/phpstan-no-safe)

Install
=======

[](#install)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/phpstan-no-safe

```

Why
===

[](#why)

Main reason for this package is to prevent usage of [`thecodingmachine/safe`](https://github.com/thecodingmachine/safe)in your codebase. And in my personal specific situation: I'm removing all usage of [`thecodingmachine/safe`](https://github.com/thecodingmachine/safe) from my packages. This is something I started back when the packages wasn't maintained for a while and the decision was made to remove it. This package is purely a way to ensure there is nothing lingering around. It's the counterpart of [`thecodingmachine/phpstan-safe-rule`](https://github.com/thecodingmachine/phpstan-safe-rule). Also would like to note that I don't think [`thecodingmachine/safe`](https://github.com/thecodingmachine/safe) is a bad package.

Usage
=====

[](#usage)

The rules in this package are automatically loaded by PHPStan when [`phpstan/extension-installer`](https://github.com/phpstan/extension-installer) is installed.

Alternatively including the extension file from the root of this package will do the same:

```
includes:
	- vendor/wyrihaximus/phpstan-no-safe/extension.neon
```

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2026 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (7 commits)")

### Embed Badge

![Health badge](/badges/wyrihaximus-phpstan-no-safe/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-phpstan-no-safe/health.svg)](https://phpackages.com/packages/wyrihaximus-phpstan-no-safe)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
