Skip to content

chore: upgrade php8.5 and laravel13 - #5

Open
iqrammm97 wants to merge 1 commit into
masterfrom
chore/upgrade-php85-laravel-13
Open

chore: upgrade php8.5 and laravel13#5
iqrammm97 wants to merge 1 commit into
masterfrom
chore/upgrade-php85-laravel-13

Conversation

@iqrammm97

Copy link
Copy Markdown

Summary

Rebuilds the settings package as a typed Laravel 13 implementation. Settings
remain a JSON document associated with an Eloquent model, with safer creation,
request-local memoization, automatic cache invalidation, custom setting-model
support, and after-commit broadcasts.

What changed

  • Require PHP 8.5 and Laravel 13 database, cache, broadcasting, queue, and
    support components.
  • Replace cache tags with Laravel's Cache::memo() repository, allowing the
    package to work with cache stores that do not support tags.
  • Add a #[ObservedBy] observer that invalidates cached settings after every
    save or delete, including writes performed outside setSetting().
  • Create settings through firstOrCreate() and protect each morph owner with a
    unique (model_type, model_id) database constraint.
  • Support dot-notation writes and recursively merge multi-setting payloads
    without discarding unrelated nested values.
  • Add late-static return types so configured custom Setting subclasses are
    created and returned correctly.
  • Reject unsaved owner models, invalid configured model classes, and corrupted
    cache values with explicit exceptions.
  • Restore normal Eloquent toArray() serialization while keeping broadcast
    payloads limited to setting values.
  • Dispatch SettingSaved broadcasts only after the surrounding database
    transaction commits.
  • Replace the timestamped legacy migration stub with an anonymous publishable
    Laravel migration.
  • Move test factories out of production autoloading and expand coverage for
    defaults, nested writes, cache invalidation, custom models, invalid states,
    deletion, and broadcasting.
  • Add Pint, Larastan/PHPStan at maximum level, PHPUnit 12, Testbench 11,
    Composer validation, security auditing, and an 85% CI coverage gate.
  • Update NPMS to consume the new contract and automatic invalidation behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant