NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1540 most downloaded on Packagist
A magic memoization function
Last release 10 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
Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 by @dependabot [bot] in #97
Full Changelog: 3.1.1...3.1.2
One column per quarter.
Full Changelog: https://github.com/spatie/once/compare/3.1.1...3.1.2
Add Dependabot Automation by @patinthehat in #80
Full Changelog: 3.1.0...3.1.1
Full Changelog: https://github.com/spatie/once/compare/3.1.0...3.1.1
Rewrite phpunit tests to pest by @otsch in #73
Add PHPStan doc blocks by @ThibaudDauce in #72
fix for caching static functions of different classes with the same name
refactor to use a WeakMap drop support for PHP 7
WeakMapallow PHP 8
Support global functions
differentiate between closures
remove excess parameter in get on cache
get on cachedo not throw an error when using once in eval
once in evaldrop support for PHP 7.1 and below
flush methodadd ability to use once in static functions
once in static functionsimprovements around serialization
ditch __memoized in favor of Spatie\Once\Cache
__memoized in favor of Spatie\Once\Cache- add MemoizeAwareTrait
MemoizeAwareTraitfix cacheability of falsy return values
- initial release
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →