Repository navigation
Conversation
🤖 PR meta 🤖👋 Welcome👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @JanJakes! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. 🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Updated as activity occurs, without notifying anyone named here. Add the 🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
Pass DB_PATH and the legacy SQLite storage constants through Playground's startup options so installation and later requests use the same database. Keep other configuration constants in the existing Blueprint step. Cover default storage, custom and legacy paths, null values, and unrelated configuration behavior with focused tests.
0cd714e to
765e732
Compare
What?
Fix custom SQLite database paths in wp-env's Playground runtime so installation and requests use the same database.
Why?
The generated Blueprint applies configuration constants after WordPress installation. Setting
DB_PATHor a legacy path setting at that point switches subsequent requests to an empty database.This also affects older SQLite integration releases; it is not a regression from randomized storage.
How?
Pass
DB_PATH,DB_DIR,DB_FILE,FQDBDIR, andFQDBthrough Playground's startup--defineoptions and omit them from the later Blueprint step. Leave other configuration values and Blueprint steps unchanged.Focused tests cover argument generation, the spawned Playground command, default storage, legacy settings, and preservation of other configuration values.
Testing Instructions
Add the following settings to a test project's
.wp-env.override.json:{ "config": { "DB_DIR": "/wordpress/custom-database", "DB_FILE": "custom.sqlite" } }Start that project with this branch's wp-env using
wp-env start --runtime=playground.Open
/wp-admin/and confirm that WordPress is installed. Create a draft post and reload the page to confirm that it remains available.Stop the environment, remove the custom database settings, and repeat to check default storage.
Compatibility was also checked with SQLite integration releases 2.2.23 and 3.0.2, and a plugin ZIP built from 4163f69, which supports
DB_PATHand randomized storage. Those checks verified the active path, installation state, plugin activation, and saved data across multiple PHP workers.