ddev / ddev

Docker-based local PHP+Node.js web development environments
https://ddev.com
Apache License 2.0
2.43k stars 579 forks source link

Tidy up order of "Project Type" and mariadb version suggestions #3561

Closed tyler36 closed 2 months ago

tyler36 commented 2 years ago

Recently, I spun a new project and noticed the following long line:

Project Type [backdrop, drupal10, drupal6, drupal7, drupal8, drupal9, laravel, magento, magento2, php, shopware6, typo3, wordpress] (laravel): 

2 things came to mind:


$ ddev --version
ddev version v1.19.0-alpha3
``
rfay commented 2 years ago

Thanks for the good eye and the suggestion. Currently it's sorted alpha, as you see, and I don't think there's any kind of sort that could do what you want. But there could be a manual sorting I guess.

rfay commented 2 years ago

And yes, people need old versions all the time. They do upgrades, they revive them, etc.

tyler36 commented 2 years ago

I'm not familiar with go but you need a "natural sort" method like:

https://github.com/facette/natsort https://github.com/skarademir/naturalsort

tyler36 commented 2 years ago

Just noticed in ddev version v1.19.0-alpha4 , database error messages (postgres:10 ... postgres:9)

Incorrect database value: postgres - use something like 'mariadb:10.3 or mysql:8.0. Options are [mariadb:10.0 mariadb:10.1 mariadb:10.2 mariadb:10.3 mariadb:10.4 mariadb:10.5 mariadb:10.6 mariadb:5.5 mysql:5.5 mysql:5.6 mysql:5.7 mysql:8.0 postgres:10 postgres:11 postgres:12 postgres:13 postgres:14 postgres:9]
rfay commented 8 months ago

This is also true of the mariadb versions: Options are [mariadb:10.1 mariadb:10.11 mariadb:10.2 mariadb:10.3 mariadb:10.4 mariadb:10.5 mariadb:10.6 mariadb:10.7 mariadb:10.8 mysql:5.7 mysql:8.0 postgres:10 postgres:11 postgres:12 postgres:13 postgres:14 postgres:15 postgres:9]

Both the mariadb versions (10.11 immediately after 10.1) and postgresql versions (9 at the end) are messy.

tyler36 commented 2 months ago

Also checked the supported databases.

Test

$ ddev config --database mariadb:50
...
failed to validate config: the laravel project has an unsupported database type/version: 'mariadb:50', DDEV amd64 only supports the following database types and versions: mariadb: [5.5 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.11], mysql: [5.5 5.6 5.7 8.0], postgres: [9 10 11 12 13 14 15 16]