assisted-mindfulness/memento
Memento is a Laravel package for capturing and restoring Eloquent model snapshots, making it easy to add undo, versioning, or audit-style history to your app. Lightweight, configurable, and simple to integrate into existing models and workflows.
Start with the version matrix, not the code. The only content of the 3.0.0 release is PR #1 ("added laravel 10, php 8.2, phpunit 10"), so the practical question for day-to-day use is "does my app meet the floor, and does anything I call actually change?"
| Constraint | 2.0.0 (assumed) | 3.0.0 |
|---|---|---|
| PHP | 8.0/8.1 | 8.2 |
| Laravel | 8/9 | 10 |
| PHPUnit (dev) | 9 | 10 |
Minimal steps:
composer require esplora/memento:^3.0 inside a Laravel 10 / PHP 8.2 app. If you are still on Laravel 9 or PHP 8.1, stay on ^2.0 — 3.0.0 will not resolve.https://github.com/esplora/memento/compare/2.0.0...3.0.0. It should be short — mostly composer.json, CI workflow, and test-suite edits. Anything touching src/ is a real behaviour change you need to account for.vendor/esplora/memento/README.md at the 3.0.0 tag — that is the authoritative usage doc, and a support-matrix bump is exactly the release where examples get refreshed.php artisan vendor:publish --provider="Esplora\Memento\MementoServiceProvider" (confirm the provider FQCN from composer.json's extra.laravel.providers). If the package ships config or migrations, publish them before first use and commit the published files.Treat 3.0.0 as a compatibility release, not a feature release. The adoption pattern is therefore a platform upgrade pattern, sequenced like this:
composer.json. Use "esplora/memento": "^3.0" rather than * or dev-main. Because the major number tracks the framework major here, a caret constraint is a meaningful, readable statement of "this app is Laravel 10".PHP 8.2 × Laravel 10 × PHPUnit 10 as the supported cell and drop the old cells rather than carrying conditionals. A matrix of exactly one row is honest and fast.@dataProvider → #[DataProvider('...')], @covers → #[CoversClass(...)], and make every data provider public static function. Update phpunit.xml to the 10.x schema (the old cacheResultFile/verbose attributes trip validation warnings).3.0.0 — and equally, you cannot assume "no breaking change". Read the diff; do not guess from the version number. Verify whether the 2.0.0 → 3.0.0 comparison touches src/ at all.composer require failing on 3.0.0 almost always means another dependency still caps laravel/framework at ^9.0 or php at ^8.1. Run composer why-not esplora/memento 3.0.0 (or composer why-not laravel/framework 10.*) to find the blocker instead of loosening constraints blindly.Creation of dynamic property ... is deprecated. Fix with explicit property declarations or #[AllowDynamicProperties] — do not silence E_DEPRECATED globally to make it go away.@dataProvider/@covers that are not converted will not error loudly in every case — they can just stop running the cases you expect. Compare test counts before and after the upgrade, not just pass/fail.php artisan config:clear and re-run config:cache. A stale cached config after a major bump is a classic five-minute mystery.register()/boot() (what is bound as singleton vs. fresh), the config/memento.php keys (if present), and any Memento:: facade or trait the README documents. Prefer the documented hook over subclassing internals — internals are exactly what a major bump is free to change.esplora/memento:2.0.0 on the same Laravel 10 / PHP 8.2 stack. If it fails on 2.0.0 too, the problem is the platform upgrade, not memento, and you are debugging the wrong package.How can I help you explore Laravel packages today?