-
-
Notifications
You must be signed in to change notification settings - Fork 842
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
feat: add support for SQLite
#3984
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still a bit worried that people using sqlite will disregard the warning, and worry why their queries are erroring. Is it possible to catch syntax errors, and in the error message, flag use of sqllite as a possible culprit?
$pdo = (new MySqlConnector)->connect($config); | ||
|
||
$version = $pdo->query('SELECT VERSION()')->fetchColumn(); | ||
|
||
if (Str::contains($version, 'MariaDB')) { | ||
if (version_compare($version, '10.0.5', '<')) { | ||
if (version_compare($version, '10.10.0', '<')) { | ||
throw new RangeException('MariaDB version too low. You need at least MariaDB 10.0.5'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this message be adjusted to match the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in the pgsql branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work on the PR!
In regards to extensions, I wonder if we can add some sort of support for database
support in the composer.json in extra.flarum-extension
or some config so it's easier to show extension compatibility. 🤔
added in #3985 (comment) |
Part of the roadmap
Changes proposed in this pull request:
Adds support for installing and using Flarum with SQLite 3.8.8+
While it is trivial to support it from core (apart from a couple exceptions where queries needed to be adapted), whether third party extensions will work with sqlite is a different matter. So I've added a warning about that on the installation page.
Screenshot


Necessity
Confirmed
composer test
).Required changes: