valet-wsl
valet-wsl copied to clipboard
Bug: Install or restart throws error
Basic info
Windows 10 Build | WSL Distro | WSL Verson | PHP Version | Valet version |
---|---|---|---|---|
19043 | Ubuntu 20.04 | 2 | 7.4.20 | 1.0.6 |
- [x] I've checked the issue queue and could not find anything similar to my bug.
- [x] I'm on the latest version of valet-wsl (
valet --version
):<Valet-wsl-Version>
- [x] I've run
valet install
after updating and before submitting my issue/feature.
What is the problem? Not sure why, but when I try to restart my valet I get the following error
Warning: Class 'Tightenco\Collect\Support\Collection' not found in /home/dzoljom/.phpenv/versions/7.4.20/composer/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
Fatal error: Uncaught Error: Interface 'JsonSerializable' not found in /home/dzoljom/.phpenv/versions/7.4.20/composer/vendor/tightenco/collect/src/Collect/Support/Enumerable.php:11
Stack trace:
#0 /home/dzoljom/.phpenv/versions/7.4.20/composer/vendor/composer/ClassLoader.php(480): include()
#1 /home/dzoljom/.phpenv/versions/7.4.20/composer/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('/home/dzoljom/....')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Tightenco\\Colle...')
#3 /home/dzoljom/.phpenv/versions/7.4.20/composer/vendor/tightenco/collect/src/Collect/Support/Collection.php(11): spl_autoload_call('Tightenco\\Colle...')
#4 /home/dzoljom/.phpenv/versions/7.4.20/composer/vendor/composer/ClassLoader.php(480): include('/home/dzoljom/....')
#5 /home/dzoljom/.phpenv/versions/7.4.20/composer/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('/home/dzoljom/....')
#6 [internal function]: Composer\Autoload\ClassLoader->loadClass('Tightenco\\Colle...')
#7 [internal fu in /home/dzoljom/.phpenv/versions/7.4.20/composer/vendor/tightenco/collect/src/Collect/Support/Enumerable.php on line 11
What was supposed to happen? Valet should restart
What actually happened? I got an error
How to reproduce this? I'm using phpenv to change php versions, so my guess is that this has something to do with this. Maybe valet is not recognizing the php version provided by the phpenv.
The php works fine (both CLI and FPM),