Open ZachWatkins opened 1 year ago
Thanks for raising this issue @ZachWatkins. Could you explain why you posted this as an issue in the Gutenberg repo? Might this issue be better posted over in https://github.com/wp-cli/wp-cli?
Thanks for raising this issue @ZachWatkins. Could you explain why you posted this as an issue in the Gutenberg repo? Might this issue be better posted over in https://github.com/wp-cli/wp-cli?
I posted this issue in the Gutenberg repo because it involves the @wordpress/env
NPM package's Docker containers and does not use WP-CLI during the issue reproduction steps.
Okay, I added the appropriate label.
Might be a WSL bug according to https://github.com/composer/composer/issues/8808 / https://bugs.php.net/bug.php?id=80227 / https://github.com/microsoft/WSL/issues/5074
Might be a WSL bug according to composer/composer#8808 / https://bugs.php.net/bug.php?id=80227 / microsoft/WSL#5074
@swissspidy Thank you for finding those! I should mention the issue isn't blocking me at work in case that affects priorities. This is a personal project and I can avoid using the composer autoloader in the cli container. I'm glad it's a known issue, although an old one, and I'm agreeable with closing it or any other steps you all decide to take.
Let's keep it open for visibility, maybe one day Microsoft fixes this in WSL :-)
Hi, This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.
Description
When I run
wp-env run cli --env-cwd=wp-content/themes/wordpress-theme composer dumpautoload
from Powershell on Windows 11, it builds an incomplete class list invendor/composer/autoload_classmap.php
and an exception is thrown due to a missing class when I runwp-env run cli --env-cwd=wp-content/themes/wordpress-theme ./vendor/bin/pest
.Output:
Test Exception:
When I run
wp-env run wordpress --env-cwd=wp-content/themes/wordpress-theme composer dumpautoload
from Powershell on Windows 11, the class list is complete and I am able to runwp-env run cli --env-cwd=wp-content/themes/wordpress-theme ./vendor/bin/pest
with passing tests.Output:
Test Success:
My repo is here: https://github.com/ZachWatkins/wordpress-theme
Step-by-step reproduction instructions
git clone https://github.com/ZachWatkins/wordpress-theme
cd wordpress-theme
nvm use
npm install
wp-env
package's Docker containers:npm start
cli
environment:npm run wp-env run cli -- --env-cwd=wp-content/themes/wordpress-theme composer install
npm run wp-env run cli -- --env-cwd=wp-content/themes/wordpress-theme ./vendor/bin/pest
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes