wp-cli / language-command

Installs, activates, and manages language packs.
MIT License
13 stars 21 forks source link

SQLite Compatibility #131

Closed swissspidy closed 9 months ago

swissspidy commented 9 months ago

Some errors I'm running into when running the tests with SQLite:

002 Scenario: Not providing plugin slugs should throw an error unless --all given # features/language-plugin.feature:224
When I run `wp language plugin list --all`                                  # features/language-plugin.feature:254
$ wp language plugin list --all

Error: The site you have requested is not installed.
Run `wp core install` to create database tables.

$ wp plugin install akismet --version=4.0 --force

Error: The site you have requested is not installed.
Run `wp core install` to create database tables.

The errors are odd in the sense that the database should have been properly installed by the SQLite plugin. Question is why that isn't happening for this test. That said, how is it supposed to that if the plugin isn't actually activated 🤔

swissspidy commented 9 months ago

A couple of failures are because the SQLite lexer uses str_ends_with, which WP only started polyfilling in WP 5.9+, but somehow the polyfill is not being loaded. And then when running the test in isolation it passes fine 🤔

Edit: happens when downgrading WP during a test I suppose.