Hello people
I juste wanted to announce that the version 1.0.0 from thecodingmachine/safe is finally live. In case you don’t know about safe, it is a library that rewrote every core php function that returns false or null on error to throw an exception instead. See this blog article
Some interesting changes:
- We now offer a safe implementation of DateTime and DateTimeImmutable
- Added new functions (most notably a lot of imagick functions) and removed some (most notably array_multisort)
- We now use the phpstan doc (instead of the php doc) to get the signatures of our generated functions which means better typehints
- Dropped support for php7.1
Full Changelog is here
What’s next? We plan to try to directly contribute to the php source to turn some rarely used (or rather rarely tested) functions into safe versions. We already did it with sprintf and hopefully we will find other such functions to improve.
submitted by /u/Kharhamel
[link] [comments]