Repository navigation
v0.5.111
Upgrading
- Run
kit:update plan|applyforsession-ui(re-pinnedsha256:f971fe6c…8bbf→sha256:fc7b37a9…9705):0001_01_02_000501_add_user_foreign_key_to_kit_security_events_table.phpand0001_01_02_000503_add_user_foreign_key_to_kit_user_state_table.phptake the type fix below. It's a type-only change, so there's nothing to migrate: a host that already ran them keeps its schema, andkit:update plan's note that a changed migration won't reach the database needs no action here. - Run
kit:update plan|applyforworkspace-ui(re-pinnedsha256:a6ece558…cfdd→sha256:c73301ca…1890):Workspace/Placeholder/Page.vue,Workspace/Settings/Placeholder/Page.vueandWorkspace/Settings/People/Page.vuetake the type fix below. No behaviour changes. - Run
kit:update plan|applyforworkspaces(re-pinnedsha256:40fdd76c…81c4→sha256:56912cc3…eafd) andsession-ui(re-pinnedsha256:fc7b37a9…9705→sha256:e0286318…10a2), thenphp artisan migrate: the new0001_01_02_000210_add_deleting_at_to_kit_workspaces_table(nullabledeleting_atanddeleting_byonworkspaces, recorded as kit-added on an adopted table) and0001_01_02_000504_create_kit_account_deletions_tablemigrations below. Existing workspaces stay open. Nothing changes for a host whose purge handler doesn't opt into deferral.
Added
- Deferred workspace and account deletion (docs/lifecycle-events.md › Deferred deletion). A purge handler that also implements
Tey\Kit\Features\Workspaces\Contracts\DefersWorkspacePurge(orTey\Kit\Features\SessionUi\Contracts\DefersAccountPurge) is no longer run inside the request's transaction. The kit closes the workspace at once (deleting_at), dispatchesWorkspaceDeleting, writes aworkspace.deletion_startedaudit row, and after the commit calls the handler'sbegin()to queue the host's job. That job purges in its own chunks and ends withapp(FinishWorkspaceDeletion::class)($workspaceId), which deletes the kit's and Concierge's rows in one short transaction and dispatchesWorkspaceDeleted. The hook is idempotent (a second call returns false) and refuses a workspace that isn't being deleted (workspace_not_deleting). A closed workspace refuses every member's admission (workspace_deleting, 403), takes no invitation or people change, is hidden from the switcher and lists, and sends its members from its pages to the workspace list with a "being deleted" notice. It's never reopened. Accounts work the same way: the account is closed at once (workspaces left, Concierge account deactivated so sign-in is refused, database sessions ended, Passport tokens revoked and Sanctum tokens deleted), thenapp(FinishAccountDeletion::class)($userId)deletes it. The synchronous mode stays the default and is unchanged.composer test:lifecycle-pagescovers both modes.
Fixed
- session-ui's user foreign key migrations pass a host's PHPStan.
000501and000503typeduser()as a barearray(missingType.iterableValue) and built the user model withnew (config(...)), anobjectwithoutgetTable()orgetKeyName()(method.notFound): six errors at level 7 in a host that analysesdatabase/.user()now returnsarray{string, string}, and the configured class is read asclass-string<Model>. The model is built and read exactly as before. A newcomposer test:phpstan-stubs(bin/phpstan-stubs.sh, a CI step) analyses every PHP stub, with.stubdropped, at PHPStan level 8 against the kit's vendor. - workspace-ui's pages type-check on vue-tsc 2. The Placeholder pages and Settings › People cast to an inline object type in the template (
as { label: string; url: string }[]), which vue-tsc 2 can't parse (TS1005). Each page now names the type in<script setup>and casts to that name. The components type-check (bin/typecheck-components.sh, CI's vue-tsc job) now covers every Vue and TypeScript file a feature installs intoresources/js(eachfeature.jsonfilesentry, at its installed path), not only core's components and the guest pages, and runs on vue-tsc 2.2.12 (installed asvue-tsc-2) as well as 3, each against Inertia 3.9.1 and 3.7.1.
What's Changed
- Type session-ui's user FK migrations and workspace-ui's template casts for host checkers (0.5.x) by @jaspertey in #495
- Add deferred workspace and account deletion (0.5.x) by @jaspertey in #504
- Release v0.5.111 by @jaspertey in #511
Full Changelog: v0.5.110...v0.5.111