Repository navigation
Troubleshooting
Written against v1.0.0.
- Pest stops with a missing Symfony class in a project with its own vendor directory
- A patch fails to apply
- The patches are not applied in an application
- The patches are not found in a consumer with its own vendor directory
vendor-dev/bin/pest (or the project's own vendor-dir) stops with Class "Symfony\Component\Console\Input\ArgvInput" not found before any test runs.
Cause: bin/pest includes <project>/vendor/autoload.php whenever that file exists and ignores the autoloader Composer's bin proxy names, so a project that keeps a different autoloader in vendor/ loads the wrong one. The package's pestphp-pest-composer-autoload-path.patch removes this; see Patches.
Fix: confirm the patch is applied in the consumer: grep -c _composer_autoload_path <vendor-dir>/pestphp/pest/bin/pest prints 1 when it is. If it prints 0, see The patches are not applied in an application.
composer install or composer update stops with an error that a patch could not be applied to pestphp/pest.
Cause: the installed release is not the one the patch is written against. The patches are written against v5.3.7, which the package pins exactly.
Fix: check which release is installed with composer show pestphp/pest. Until the package is updated for that release, keep the consumer on a release the patch applies to, and report it with the release named. Verifying the patch set shows how to apply a patch to a given tag by hand.
The package is installed, but composer install applies none of its patches.
Cause: cweagans/composer-patches applies a dependency's patches only from packages in composer.lock. An application that requires the package with --dev keeps it under packages-dev, where its patches are not read.
Fix: an application requires the package in require, as the README shows. An add-on is the exception: it requires the package with --dev and lists the patch files in its own root patches.json.
composer install applies none of the package's patches, or stops with an error naming a patch path under vendor/uams-web/patches-pestphp-pest/patches/.
Cause: the patch paths in the package are relative to the consumer's root and start vendor/uams-web/patches-pestphp-pest/patches/. A consumer whose vendor-dir is not vendor has the files somewhere else.
Fix: none in the package today; a non-default vendor-dir is not covered.
Home | Guides | Troubleshooting | Reference | Project | README | Repository
Written against v1.0.0. Edit these pages in docs/wiki/ through a pull request; edits made in the wiki are overwritten by the next publish.
Getting started
Guides
Troubleshooting
Reference
Project