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
Document that SQLite is included? #210
Comments
I'd also like to know how to use sqlite for PhpUnit tests when connected directly to the container. By "directly to the container" - I am using VSCode's "Dev container" extension to connect directly to the Lando app container. For example, with the following in my phpunit.xml file:
when running a test, I get a
and
with the same result. If I try to connect to mysql, I get a similar result:
What am I missing? thanks, |
If it's any help, Lando + Drupal Contributions uses SQLite like this in
(Note: Add this patch for Drupal 10 compatibility: thinktandem/drupal-contributions#76) Using VSCode's "Dev container" extension to connect directly to the Lando app container sounds interesting. It would be cool to also get PhpStorm and Lando + Drupal Contributions working that way. If it's relevant, there's a Free PhpStorm license for +35 Drupal issue credits over the past year, and you seem to qualify. |
@gitressa Thanks for the info - I'm not sure what I was doing wrong yesterday, but I tried things again today and it worked (for mysql and sqlite) - very odd. I didn't add anything to my .lando.yml file. The values I'm using in my phpunit.xml file are:
or
I'm all set with a PhpStorm license, but thanks for the info. -mike |
Great that you got it working. Sometimes all it takes is a restart :) And thanks by the way for blogging about PhpStorm in Setting up Xdebug with Lando and PhpStorm in 2018. It was quite helpful when I recently had to set it up myself. Since then (as you probably know) things have luckily changed and most of the configuration happens automagically. So I updated the documentation for Configuring PhpStorm and Xdebug in Lando for Drupal 10 the other day, in case you're interested. Have a great day |
Yep, I'm well aware - I teach with various combinations of PhpStorm/VSCode + Lando/DDEV, including setting up all the things (PhpUnit, PhpStan, phpcs, Xdebug) integrated with the IDE. I'm working on adding connecting both PhpStorm and VSCode directly to the Lando/DDEV app/web container with all the same tools integrated in the IDE. thanks again! |
Great! I hope you get it all working, adding PHPUnit to the mix adds a little extra challenge :) I now realize that is also what lando/php#6 is about. I'll have a go at it later, and add it to the "Configuring PhpStorm and Xdebug in Lando" for Drupal 10 guide if I succeed. |
SQLite is supported out of the box, which is great, and you can run this, without having to define
database: sqlite
in.lando.yml
:$ drush site:install --db-url=sqlite://drupal9:drupal9@database/drupal9 -y
Should SQLite perhaps be added to the list of "Databases" under "Services", together with MariaDB, MongoDB, MySQL, etc. on https://docs.lando.dev/?
The text was updated successfully, but these errors were encountered: