Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to official WordPress SQLite plugin that uses SQL parser #152

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

adamziel
Copy link
Collaborator

Description

Migrates Playground from regexp-based wp-sqlite-db to the official sqlite-database-integration plugin which translates queries using SQL parser instead of regular expressions.

This makes for a more reliable SQLite integration that passes almost all WordPress unit tests.

Learn more about the problem with regular expressions.

| sed 's#{SQLITE_IMPLEMENTATION_FOLDER_PATH}#'`pwd`'/wordpress/wp-content/plugins/sqlite-database-integration#g' \
| sed 's#{SQLITE_PLUGIN}#sqlite-database-integration#g' \
> wordpress/wp-content/db.php && \
| sed "s#{SQLITE_IMPLEMENTATION_FOLDER_PATH}#' . __DIR__ . '/plugins/sqlite-database-integration#g" \
Copy link
Collaborator Author

@adamziel adamziel Mar 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an intentional PHP injection. I'm not proud. Eventually let's find a better approach to setting up this plugin programaticaly. cc @aristath

@adamziel adamziel changed the title Add sqlite database integration Migrate to official WordPress SQLite plugin that uses SQL parser Mar 17, 2023
@adamziel adamziel merged commit 813067d into trunk Mar 17, 2023
@adamziel adamziel deleted the add-sqlite-database-integration branch March 17, 2023 00:24
@adamziel adamziel added the Build label Mar 17, 2023
@adamziel adamziel mentioned this pull request Apr 27, 2023
56 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant