Follow the Wiki from valet-wsl
Some projects may require older php version but minimum is 7.2 for the CLI which valet-wsl
requires.
The default Ubuntu 18.04 LTS is pre installed with Php version 7.4 in valet it is easy to use a specific version of php by
$ valet use 7.2
However this does not include the libraries which from the default valet-wsl
Wiki at #6
below is a simple fix.. Change version number if you please.
sudo apt-get install \
php7.2-cli \
php7.2-mysql \
php7.2-sqlite3 \
php7.2-intl \
php7.2-zip \
php7.2-xml \
php7.2-curl \
php7.2-mbstring
$ valet restart && sudo service mysql restart