Download the PHP package eventjet/thecodingmachine-safe-meta without Composer
On this page you can find all versions of the php package eventjet/thecodingmachine-safe-meta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eventjet/thecodingmachine-safe-meta
More information about eventjet/thecodingmachine-safe-meta
Files in eventjet/thecodingmachine-safe-meta
Package thecodingmachine-safe-meta
Short Description Meta Package for installing thecodingmachine/safe in PHP 7 and PHP 8
License MIT
Informations about the package thecodingmachine-safe-meta
thecodingmachine/safe Meta Package
Abandoned!
As thecodingmachine/safe
was
again "un-deprecated"
this meta-package is no longer needed. A big thank you to all involved people! 🙂
What is this?
This package is a small wrapper to allow installing thecodingmachine/safe
on PHP 7 and thecodingmachine/safe8
on PHP 8 automatically, depending on
the used PHP version.
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?
Instead of requiring thecodingmachine/safe
directly, use this package in composer.json
:
Caveats
Requiring a package indirectly introduces a hidden dependency, which is excatly what this package does. Therefore, if you use 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:
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!
Special thanks goes to 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.