PackageTrack
Sign in Get early access

spatie/once

A magic memoization function

3.1.2 30M downloads/mo #1437 most downloaded on Packagist spatie/once

What this package is like to depend on

Last release 9 months ago

25 Nov 2025

Release timing varies

gaps range from 2 months to 2.1 years

Nearly every release is documented

notes for 18 of 19 stable releases

Nothing withdrawn

no release was ever pulled

10 years old

19 releases · first in 2016

1 release in the last 12 months

see the full history below

Release timeline

19 releases · Nov 2016 to Nov 2025
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 19
  1. 3.1.2 25 Nov 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.1.1...3.1.2

    Open source →
    Release notes

    What's Changed

    • Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 by @dependabot[bot] in https://github.com/spatie/once/pull/97
    • Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0 by @dependabot[bot] in https://github.com/spatie/once/pull/102
    • Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot[bot] in https://github.com/spatie/once/pull/103
    • Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 by @dependabot[bot] in https://github.com/spatie/once/pull/104
    • Update issue template by @AlexVanderbist in https://github.com/spatie/once/pull/107
    • Bump stefanzweifel/git-auto-commit-action from 4 to 7 by @dependabot[bot] in https://github.com/spatie/once/pull/108
    • Bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/spatie/once/pull/106
    • Added Symfony 8 support to all symfony/* packages. by @thecaliskan in https://github.com/spatie/once/pull/110
    • Bump actions/checkout from 5 to 6 by @dependabot[bot] in https://github.com/spatie/once/pull/111

    New Contributors

    • @AlexVanderbist made their first contribution in https://github.com/spatie/once/pull/107
    • @thecaliskan made their first contribution in https://github.com/spatie/once/pull/110

    Full Changelog: https://github.com/spatie/once/compare/3.1.1...3.1.2

    Open source →
  2. 3.1.1 27 May 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.1.0...3.1.1

    Open source →
    Release notes

    What's Changed

    • fix spacing by @faisuc in https://github.com/spatie/once/pull/77
    • Add Dependabot Automation by @patinthehat in https://github.com/spatie/once/pull/80
    • Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/once/pull/82
    • Update Dependabot Automation by @patinthehat in https://github.com/spatie/once/pull/83
    • Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/spatie/once/pull/84
    • Update README.md by @davidjr82 in https://github.com/spatie/once/pull/87
    • Bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 by @dependabot in https://github.com/spatie/once/pull/89
    • Bump dependabot/fetch-metadata from 1.4.0 to 1.5.1 by @dependabot in https://github.com/spatie/once/pull/90
    • Bump dependabot/fetch-metadata from 1.5.1 to 1.6.0 by @dependabot in https://github.com/spatie/once/pull/93
    • Bump actions/checkout from 2 to 4 by @dependabot in https://github.com/spatie/once/pull/94
    • Adjust pretty name of closures on PHP 8.4 by @staabm in https://github.com/spatie/once/pull/99

    New Contributors

    • @faisuc made their first contribution in https://github.com/spatie/once/pull/77
    • @patinthehat made their first contribution in https://github.com/spatie/once/pull/80
    • @dependabot made their first contribution in https://github.com/spatie/once/pull/84
    • @davidjr82 made their first contribution in https://github.com/spatie/once/pull/87
    • @staabm made their first contribution in https://github.com/spatie/once/pull/99

    Full Changelog: https://github.com/spatie/once/compare/3.1.0...3.1.1

    Open source →
  3. 3.1.0 21 Apr 2022
    Release notes

    What's Changed

    • Rewrite phpunit tests to pest by @otsch in #73

    New Contributors

    • @otsch made their first contribution in #73

    Full Changelog: 3.0.2...3.1.0

    Open source →
  4. 3.0.2 04 Feb 2022
    Release notes

    What's Changed

    Full Changelog: 3.0.1...3.0.2

    Open source →
  5. 3.0.1 04 Jul 2021
    Release notes
    • fix for caching static functions of different classes with the same name (#62)
    Open source →
    Release notes
    • fix for caching static functions of different classes with the same name (#62)
    Open source →
  6. 3.0.0 03 Nov 2020
    Release notes
    • refactor to use a WeakMap
    • drop support for PHP 7
    Open source →
    Release notes
    • refactor to use a WeakMap
    • drop support for PHP 7
    Open source →
  7. 2.2.1 29 Oct 2020
    Release notes
    • allow PHP 8
    Open source →
    Release notes
    • allow PHP 8
    Open source →
  8. 2.2.0 18 Feb 2020
    Release notes
    • Support global functions
    Open source →
    Release notes
    • support global functions
    Open source →
  9. 2.1.3 31 Oct 2019
    Release notes
    • differentiate between closures (#42)
    Open source →
    Release notes
    • differentiate between closures (#42)
    Open source →
  10. 2.1.2 05 Aug 2019
    Release notes
    • remove excess parameter in get on cache
    Open source →
    Release notes
    • remove excess parameter in get on cache
    Open source →
  11. 2.1.1 26 Jun 2019
    Release notes
    • do not throw an error when using once in eval
    Open source →
  12. 2.1.0 19 Jun 2019
    Release notes
    • add enabling/disable the cache
    • add flush method
    • drop support for PHP 7.1 and below
    Open source →
  13. 2.0.2 27 Dec 2018
    Release notes
    • add ability to use once in static functions
    Open source →
  14. 2.0.1 31 Jan 2018
    Release notes
    • improvements around serialization
    Open source →
  15. 2.0.0 31 Jan 2018
    Release notes
    • ditch __memoized in favor of Spatie\Once\Cache
    Open source →
  16. 1.1.0 24 Aug 2017
    Release notes
    • add MemoizeAwareTrait
    Open source →
  17. 1.0.1 14 Nov 2016
    Release notes
    • fix cacheability of falsy return values
    Open source →
  18. 1.0.0 07 Nov 2016
    Release notes
    • initial release
    Open source →
  19. 0.0.1 06 Nov 2016

    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