feat: move native app persistence onto surreal#130
Merged
ibourgeois merged 1 commit intomainfrom Mar 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns the packaged NativePHP desktop runtime with Katra’s Surreal-first persistence strategy by ensuring core Laravel state (auth/users, sessions, cache, queues) uses SurrealDB rather than NativePHP’s internal SQLite defaults.
Changes:
- Introduces a native-runtime persistence configurator that rewires database/session/cache/queue config to SurrealDB when running under NativePHP.
- Adds a feature test that boots a local SurrealDB runtime and asserts auth/session/cache state is stored on the Surreal connection.
- Documents the desktop persistence model in both the NativePHP development docs and the README.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/NativeRuntimePersistenceTest.php | Regression test validating native runtime persistence (DB/session/cache/queue) resolves to SurrealDB. |
| app/Support/Native/NativeRuntimePersistence.php | New configurator that applies the NativePHP desktop persistence overrides. |
| app/Providers/NativeAppServiceProvider.php | Invokes the persistence configurator during native runtime boot. |
| config/nativephp.php | Adds an explicit nativephp.persistence configuration block for desktop persistence defaults. |
| docs/development/nativephp.md | Documents the Surreal-first desktop persistence model and customization entrypoints. |
| README.md | Summarizes the desktop persistence model for contributors/users. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #120
Testing
'/Users/ibourgeois/Library/Application Support/Herd/bin/php84' artisan cache:clear --no-interaction'/Users/ibourgeois/Library/Application Support/Herd/bin/php84' vendor/bin/pint --dirty --format agent'/Users/ibourgeois/Library/Application Support/Herd/bin/php84' artisan test --compact tests/Feature/NativeRuntimePersistenceTest.php tests/Feature/FortifyAuthenticationTest.php tests/Feature/SurrealSessionDriverTest.php tests/Feature/DatabaseCacheOnSurrealTest.php tests/Feature/SurrealQueueDriverTest.php