PHPackages                             eventjet/thecodingmachine-safe-meta - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. eventjet/thecodingmachine-safe-meta

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

eventjet/thecodingmachine-safe-meta
===================================

Meta Package for installing thecodingmachine/safe in PHP 7 and PHP 8

2.0.1(5y ago)1606MITPHP ^8.0

Since Apr 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/eventjet/thecodingmachine-safe-meta)[ Packagist](https://packagist.org/packages/eventjet/thecodingmachine-safe-meta)[ RSS](/packages/eventjet-thecodingmachine-safe-meta/feed)WikiDiscussions 1.0.x Synced 3w ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

thecodingmachine/safe Meta Package
==================================

[](#thecodingmachinesafe-meta-package)

Abandoned!
----------

[](#abandoned)

As `thecodingmachine/safe` was again "[un-deprecated](https://github.com/thecodingmachine/safe/commit/56ab9335d67c505d6eeae411584e2066e7a1ac0e)" this meta-package is no longer needed. A big thank you to all involved people! 🙂

What is this?
-------------

[](#what-is-this)

This package is a small wrapper to allow installing [`thecodingmachine/safe`](https://github.com/thecodingmachine/safe)on PHP 7 and [`thecodingmachine/safe8`](https://github.com/thecodingmachine/safe8) on PHP 8 automatically, depending on the used PHP version.

Why do I need this?
-------------------

[](#why-do-i-need-this)

`thecodingmachine/safe` is only available for PHP 7. For PHP 8, `thecodingmachine/safe8` was created. That makes it impossible to have a package using the awesome `Safe` library while supporting PHP `^7.4 || ^8.0`.

How do I use it?
----------------

[](#how-do-i-use-it)

Instead of requiring `thecodingmachine/safe` directly, use this package in `composer.json`:

```
{
    "require": {
        "php": "^7.4 || ^8.0",
        "eventjet/thecodingmachine-safe-meta": "^1.0 || ^2.0"
    }
}
```

Caveats
-------

[](#caveats)

Requiring a package indirectly introduces a *hidden dependency*, which is excatly what this package does. Therefore, if you use [ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker), it will complain. As a workaround you have to whitelist every function/class that is used in your code.

Create a `require-checker.json` file which includes the used `Safe` functions:

```
{
    "symbol-whitelist": [
        "null",
        "true",
        "false",
        "static",
        "self",
        "parent",
        "array",
        "string",
        "int",
        "float",
        "bool",
        "iterable",
        "callable",
        "void",
        "object",
        "mixed",

        "Safe\\sprintf"
    ]
}
```

And then run the checker with that config: `vendor/bin/composer-require-checker --config-file=require-checker.json`.

If you know a better workaround for that, please let me know!

Thanks!
-------

[](#thanks)

Special thanks goes to [Kharhamel](https://github.com/Kharhamel) and all contributors who created `thecodingmachine/safe`! Hopefully, some time this package won't be required anymore if there is some way for `Safe`to support PHP 7 and PHP 8 in one package.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~39 days

Total

5

Last Release

1737d ago

Major Versions

1.0.0 → 2.0.02021-04-30

PHP version history (2 changes)1.0.0PHP ^7.4

2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf84c6852b03fde91d73c1c04b6dabe5d47167d4994a6cf40c11e5cfd18d07e7?d=identicon)[trinet](/maintainers/trinet)

---

Top Contributors

[![rieschl](https://avatars.githubusercontent.com/u/3321556?v=4)](https://github.com/rieschl "rieschl (2 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/eventjet-thecodingmachine-safe-meta/health.svg)

```
[![Health](https://phpackages.com/badges/eventjet-thecodingmachine-safe-meta/health.svg)](https://phpackages.com/packages/eventjet-thecodingmachine-safe-meta)
```

PHPackages © 2026

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