PackageTrack
Sign in Get early access

thecodingmachine/safe

PHP core functions that throw exceptions instead of returning FALSE on error

v3.4.0 125M downloads/mo #176 most downloaded on composer thecodingmachine/safe

What this package is like to depend on

Last release 6 months ago

04 Feb 2026

Ships unpredictably

gaps range from 2 weeks to 1.8 years

Rarely documented

notes for 8 of 56 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

68 releases · first in 2018

1 release in the last 12 months

see the full history below

Release timeline

65 releases · Sep 2018 to Feb 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 68
  1. v3.4.0 04 Feb 2026
    Release notes

    What's Changed

    The major things are the first three changes - removing and deduplicating content so that new versions of PHP can be supported with relatively small increases to the total package size (and the corresponding addition of initial php8.6 support)

    New Contributors

    Full Changelog: v3.3.0...v3.4.0

    Open source →
  2. v3.4.0-beta1 no date pre-release
    Release notes

    Add safe wrapper fo unserialize

    Open source →
  3. v3.3.0 14 May 2025
    Release notes

    What's Changed

    Full Changelog: v3.2.0...v3.3.0

    Open source →
  4. v3.2.0 13 May 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v3.1.1...v3.2.0

    Open source →
  5. v3.1.1 28 Apr 2025
    Release notes

    What's Changed

    • Automatically regenerate the files by @github-actions in #652
    • Automatically regenerate the files by @github-actions in #655
    • Automatically regenerate the files by @github-actions in #656
    • openssl_random_pseudo_bytes always returns string (closes #654) by @mvhirsch in #658

    New Contributors

    Full Changelog: v3.1.0...v3.1.1

    Open source →
  6. v3.1.0 12 Apr 2025
    Release notes

    What's Changed

    • Automatically regenerate the files by @github-actions in #639
    • Automatically regenerate the files by @github-actions in #641
    • Add falsy regexes, primarily for session functions by @timsmid in #642
    • Mark sodium verify functions as hidden by @timsmid in #643
    • Automatically regenerate the files by @github-actions in #644
    • [generator] use libxml internal errors by @shish in #648
    • [array_combine] override phpstan's incorrect function map, fixes #646 by @shish in #647
    • [json_decode] update function signature to match PHP 8.X, fixes #645 by @shish in #649
    • Automatically regenerate the files by @github-actions in #650
    • Automatically regenerate the files by @github-actions in #651

    New Contributors

    Full Changelog: v3.0.2...v3.0.3

    Open source →
  7. v3.0.2 19 Feb 2025
    Release notes

    What's Changed

    • Be consistent in using more-specific types in docblocks by @shish in #635
    • Remove more redundant overrides by @shish in #636
    • more docs by @shish in #634

    Full Changelog: v3.0.1...v3.0.2

    Open source →
  8. v3.0.1 18 Feb 2025
    Release notes

    What's Changed (Externally visible)

    • Generate full functions even for pass-through wrappers, fixes #621 by @shish in #622
    • Add a hidden functions list, fixes #618 by @shish in #631
    • More thorough nullability detection by @shish in #626
    • Make all return types alphabetical by @shish in #624

    What's Changed (Internals)

    • Fix typos by @szepeviktor in #616
    • Update .gitattributes by @mfn in #620
    • [generator] better error handling by @shish in #623
    • [generator] remove unused function by @shish in #625
    • [generator] remove some redundant edge-cases by @shish in #628
    • Hide a couple of parameters from stack traces by @shish in #629
    • [generator] defer nullable/falsable handling by @shish in #630
    • Remove another redundant "bugfix" (and in doing so, fix pg_copy_from) by @shish in #632
    • More consistent formatting for generated files by @shish in #633

    New Contributors

    • @mfn made their first contribution in #620

    Full Changelog: v3.0.0...v3.0.1

    Open source →
  9. v3.0.0 11 Feb 2025
    Release notes

    What's Changed (tl;dr)

    • Compatibility with PHP 8.4 - no more syntax deprecation warnings
    • Dropped support for EOL'ed PHP versions - PHP 8.1 is the new minimum
    • Separate wrappers generated for each PHP version, to make sure that the wrappers match the standard library whether you're using 8.1 or 8.4
    • Lots more unsafe functions are detected (including those which return -1 on error)
    • Type hints should be more expansive and more accurate
    • Internals cleaned up and documentation added, to make the project easier to contribute to

    What's Changed (Full)

    • Change misspelled occured to occurred by @spawnia in #416
    • Remove dev-master aliases by @shish in #463
    • Add dependabot config by @shish in #459
    • Add devcontainer config by @shish in #458
    • Update CI/CD workflows by @shish in #460
    • Bring lib/ up to php8.4 standards by @shish in #466
    • Bring deprecated override files up to php8.4 syntax by @shish in #464
    • Add auto-regenerate CI workflow by @shish in #461
    • Use less-old phpstan by @shish in #462
    • Skip json_last_error check when JSON_THROW_ON_ERROR flag is set in json_decode by @marmichalski in #451
    • CI: disable fail-fast so we see all results by @staabm in #469
    • Require PHP 8.1 by @simPod in #433
    • Remove Travis CI badge from README by @staabm in #472
    • fix named arg w json_decode to be consistent with php by @staabm in #473
    • Drop double \ from parameter types by @WyriHaximus in #445
    • Add custom base64_decode fcn mapping by @simPod in #431
    • Fix typo in "signatures" by @simPod in #429
    • Update testDetectFalsyFunction by @simPod in #432
    • Update symfony dependencies by @staabm in #475
    • remove no-longer-needed workaround by @shish in #477
    • Force generator to use PHP 8.1.x by @staabm in #476
    • Fix regex matching for removed functions by @shish in #483
    • Fix file scanning by @shish in #485
    • Constructor property promotions by @shish in #482
    • enable strict_types in generator by @shish in #481
    • Fix unit tests by @shish in #488
    • Detect nullable-default parameters and generate appropriate outputs by @shish in #486
    • Handle more PHPStan type edge-cases by @shish in #487
    • make build.sh more accurately match what the github workflow does by @shish in #491
    • Added lint in github actions by @staabm in #493
    • PHPStan: enable bleeding edge by @staabm in #494
    • Misc smaller changes by @shish in #492
    • Regenerate files based on latest code changes by @shish in #489
    • Convert "true" typehint to "bool" by @shish in #497
    • Create FUNDING.yml by @staabm in #496
    • detect inet_pton by @shish in #498
    • Automatically regenerate the files by @github-actions in #478
    • Generate code which better matches our formatting standards by @shish in #501
    • support union type from php documentation by @smoench in #506
    • Automatically regenerate the files by @github-actions in #505
    • Automatically regenerate the files by @github-actions in #507
    • Automatically regenerate the files by @github-actions in #509
    • fix unit tests by @shish in #513
    • remove $ so cut-and-paste works by @tacman in #514
    • [generator] make import tests into a unit test by @shish in #517
    • [docker] mark doc directories as safe for git to use by @shish in #516
    • [docker] exit early if build fails by @shish in #515
    • [generator] make import tests into a unit test by @shish in #512
    • [docker] mark doc directories as safe for git to use by @shish in #511
    • fix openssl_encrypt special case signature by @shish in #518
    • Remove APC bits by @shish in #519
    • Automatically regenerate the files by @github-actions in #520
    • Re-sync generator/config/specialCasesFunctions.php by @shish in #521
    • [ci] split "Regenerate files" and "check for differences" into two steps by @shish in #524
    • [ci] also split steps for auto-regen workflow by @shish in #525
    • [ci] fetch full history for php docs by @shish in #526
    • [auto-regenerate] fetch full history for docs by @shish in #527
    • Automatically regenerate the files by @github-actions in #532
    • Remove libxml_get_last_error because false is not an error in this case, fixes #438 by @shish in #528
    • Ignore functions which were removed pre-8.1 by @shish in #529
    • [cli] use ProgressBar rather than log spam by @shish in #530
    • ignore phpstan when phpstan claims that something is a resource, fixes #448, fixes #479, fixes #411 by @shish in #533
    • Remove support for deprecated functions (which will be re-added later) by @shish in #536
    • remove unused file from generator by @shish in #535
    • Add an architecture overview section to the contributor guide by @shish in #534
    • superficial bits in preparation for #503 by @shish in #540
    • Move tests for generated files into generated file test folder by @shish in #538
    • [ci] make rector tests less redundant by @shish in #542
    • Document which versions of PHP are supported by @shish in #539
    • [dev] function-info command by @shish in #531
    • [generator] reduce hard-coding of directory paths by @shish in #543
    • bump php version used in docker by @shish in #544
    • more removal of hard-coded paths by @shish in #545
    • Organise generator into namespaces by @shish in #541
    • Generate files for multiple versions by @shish in #503
    • Run phpstan on unit test directory by @shish in #548
    • [dev] also mark /app as safe during .devcontainer/build.sh by @shish in #549
    • [generator] fix typo by @shish in #550
    • [generator] strip another category of falsey text by @shish in #551
    • [generator] a little superficial consistency by @shish in #552
    • [generator] ignore benevolence properly by @shish in #553
    • Fix return types being incorrectly marked as resources, fixes #546 by @shish in #547
    • [generator] Remove redundant phpstan overrides by @shish in #554
    • remove superfluous null from preg_match_all, fixes #389 by @shish in #556
    • mark shell_exec as falsy, not nullsy, fixes #281 by @shish in #557
    • more docs by @shish in #558
    • fix signature for socket_addrinfo_bind by @shish in #559
    • more manual hints by @shish in #560
    • Mark generated files as generated by @shish in #561
    • Automatically regenerate the files by @github-actions in #564
    • Move XML type parsing into PhpStanType by @shish in #563
    • more detailed function-info output by @shish in #565
    • Sort union types by @shish in #568
    • Deduplicate (and unit test) logic for selecting the type-hint data source by @shish in #569
    • More special-cases of preferring phpdoc to phpstan by @shish in #570
    • Remove more redundant phpstan overrides by @shish in #567
    • Simplify FunctionMapReader by @shish in #571
    • More cases where 'resource' is incorrect by @shish in #572
    • Fix signature for openssl_csr_sign by @shish in #573
    • add regex for 'false if an error occurs', fixes #447 by @shish in #574
    • strpos -> str_contains by @shish in #575
    • strpos -> str_contains in generated files by @shish in #576
    • Allow non-empty-string / non-falsey-string in docblocks, fixes #398 by @shish in #577
    • add proc_open, see #424 by @shish in #578
    • turn foo[] into array rather than iterable, fixes #582 by @shish in #583
    • [ci] fail workflow if we can't fetch input data by @shish in #581
    • move configuration-y bits to /generator/config by @shish in #580
    • add ob_get_clean in 8.1-8.3 by @shish in #584
    • detect bzopen, fixes #407 by @shish in #585
    • [github] issue templates by @shish in #586
    • Update incorrect_function.yml by @shish in #587
    • Update missing_function.yml by @shish in #588
    • better forms by @shish in #589
    • Make function-info 4000x faster by @shish in #590
    • detect ftell (and popen), see #256 by @shish in #592
    • deduplicate getErrorType by @shish in #591
    • detect preg_replace_callback and preg_replace_callback_array, fixes #223 by @shish in

    Note truncated.

    Open source →
  10. v3.0.0-beta2 09 Feb 2025 pre-release
    Release notes

    add return statements to functionsList.php

    Open source →
  11. v3.0.0-beta1 07 Feb 2025 pre-release

    Nothing published for this version

  12. v3.0.0-alpha2 04 Feb 2025 pre-release

    Nothing published for this version

  13. v3.0.0-alpha1 03 Feb 2025 pre-release

    Nothing published for this version

  14. v2.5.0 05 Apr 2023

    Nothing published for this version

  15. v2.4.0 07 Oct 2022

    Nothing published for this version

  16. v2.3.1 20 Sep 2022

    Nothing published for this version

  17. v2.3.0 13 Sep 2022

    Nothing published for this version

  18. v2.2.3 04 Aug 2022

    Nothing published for this version

  19. v2.2.2 20 Jul 2022

    Nothing published for this version

  20. v2.2.1 09 Jun 2022

    Nothing published for this version

  21. v2.2.0 25 May 2022

    Nothing published for this version

  22. v2.1.4 02 May 2022

    Nothing published for this version

  23. v2.1.3 30 Mar 2022

    Nothing published for this version

  24. v2.1.2 01 Feb 2022

    Nothing published for this version

  25. v2.1.1 19 Jan 2022

    Nothing published for this version

  26. v2.1.0 18 Jan 2022

    Nothing published for this version

  27. v2.0.2 11 Jan 2022

    Nothing published for this version

  28. v2.0.1 05 Jan 2022

    Nothing published for this version

  29. 2.0.0-alpha.3 17 Oct 2021 pre-release

    Nothing published for this version

  30. 2.0.0-alpha.2 16 Oct 2021 pre-release

    Nothing published for this version

  31. 2.0.0-alpha.1 19 Aug 2021 pre-release

    Nothing published for this version

  32. v1.3.3 28 Oct 2020

    Nothing published for this version

  33. v1.3.2 22 Oct 2020

    Nothing published for this version

  34. v1.3.1 08 Oct 2020

    Nothing published for this version

  35. v1.3.0 no date

    Nothing published for this version

  36. v1.2.1 25 Sep 2020

    Nothing published for this version

  37. v1.2.0 03 Sep 2020

    Nothing published for this version

  38. v1.1.3 10 Jul 2020

    Nothing published for this version

  39. v1.1.2 11 Jun 2020

    Nothing published for this version

  40. v1.1.1 04 May 2020

    Nothing published for this version

  41. v1.0.3 20 Jan 2020

    Nothing published for this version

  42. v1.0.2 09 Jan 2020

    Nothing published for this version

  43. v1.0.1 08 Jan 2020

    Nothing published for this version

  44. v1.0.0 19 Dec 2019

    Nothing published for this version

  45. v1.0.0-beta4 18 Dec 2019 pre-release

    Nothing published for this version

  46. v1.0.0-beta3 16 Dec 2019 pre-release

    Nothing published for this version

  47. v1.0.0-beta2 no date pre-release

    Nothing published for this version

  48. 1.0.0-beta1 21 Oct 2019 pre-release

    Nothing published for this version

  49. v0.1.16 25 Jun 2019

    Nothing published for this version

  50. v0.1.15 17 Apr 2019

    Nothing published for this version

  51. v0.1.14 07 Mar 2019

    Nothing published for this version

  52. v0.1.13 30 Jan 2019

    Nothing published for this version

  53. v0.1.12 30 Jan 2019

    Nothing published for this version

  54. v0.1.11 11 Jan 2019

    Nothing published for this version

  55. v0.1.10 10 Jan 2019

    Nothing published for this version

  56. v0.1.9 04 Jan 2019

    Nothing published for this version

  57. v0.1.8 13 Nov 2018

    Nothing published for this version

  58. v0.1.7 08 Nov 2018

    Nothing published for this version

  59. v0.1.6 30 Oct 2018

    Nothing published for this version

  60. v0.1.5 24 Sep 2018

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive