Releases: TimurTurdyev/Simple-Settings
Releases · TimurTurdyev/Simple-Settings
v3.0.0
Breaking Changes
Migration: composite primary key replaces surrogate id
The id auto-increment column has been removed. (group, name) is now the primary key.
If you have already run the previous migration, apply this to your database:
-- MySQL / MariaDB
ALTER TABLE simple_settings
DROP PRIMARY KEY,
DROP COLUMN id,
ADD PRIMARY KEY (group, name);
-- PostgreSQL
ALTER TABLE simple_settings
DROP CONSTRAINT simple_settings_pkey,
DROP COLUMN id,
ADD PRIMARY KEY (group, name);Fresh installations are not affected — just run php artisan migrate as usual.
Bug Fixes
SettingDeletedevent now fires after the delete, not before — listeners no longer react to rows that may still exist due to a failed queryremove(?string $key)signature is now correctly nullable (was implicitly nullable, deprecated in PHP 8.1+)SettingSetCommand: invalid JSON input now outputs a clear error message and returnsFAILUREinstead of silently storingnull- Tests: explicitly set
cache.default = arrayto work with Laravel 12's new defaultdatabasecache driver
Improvements
persistSetting()now uses a singleupsert()call instead ofSELECT + INSERT/UPDATEset(array $values)flushes cache once after all writes instead of once per keyloadMigrationsFrom()moved outsiderunningInConsole()— migrations are now available in all contexts (queued jobs, custom scripts)- Removed
laravel/frameworkfromrequire-dev— already pulled transitively byorchestra/testbench - New
BaseCommandeliminates repeatedapp(SettingStorageInterface::class)->forGroup()across all Artisan commands getMapWithKeys()simplified to a singlemapWithKeys()callCastsValue::valueToString()— merged identicalarray/objectmatch arms- Removed redundant
$guarded(shadowed by$fillable), redundant string casts, and manualupdateTimestamps()call
Code Quality
- Methods reordered in all classes for logical readability: group selection → read → write → cache → private helpers
- README fully rewritten with complete API reference, all commands, events, validation, and schema docs
Tests
test_set_stores_timestamps_on_create— verifiescreated_atandupdated_atare set on first writetest_set_updates_updated_at_but_preserves_created_at_on_overwrite— verifiescreated_atis immutable across updates
Поменяли название пакета
v1.0.7 wip: composer name change
v1.0.6
wip
Full Changelog: v1.0.5...v1.0.6
v1.0.5
wip
v1.0.4
wip
v1.0.3
wip
v1.0.2
wip
v1.0.1
wip
v1.0.0
wip