Search by

uams-web / patches-pestphp-pest

joshdaughertybpmore

Patches UAMS-Web repositories apply to pestphp/pest

Package info

github.com/UAMS-Web/patches-pestphp-pest

Language:JavaScript

pkg:composer/uams-web/patches-pestphp-pest

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 3

v1.0.0 2026-12-02 02:17 UTC

This package is auto-updated.

Last update: 2026-12-02 15:17:47 UTC


README

Patches that UAMS-Web repositories apply to pestphp/pest with cweagans/composer-patches 2.x. One package replaces the copies each repository carried, so a patch is changed once and retires everywhere in one release.

This package pins pestphp/pest to exactly 5.3.7. Every patch is written against that release.

The wiki holds the reference for the patch set, versioning, verification and troubleshooting.

Install

This package is read from GitHub with a vcs repository, not from Packagist. The consumer's root composer.json lists it (Composer reads repositories only from the root project):

"repositories": [
  { "type": "vcs", "url": "https://github.com/UAMS-Web/patches-pestphp-pest.git" }
]

An application requires it in require (the plugin applies a dependency's patches only from packages in composer.lock):

composer require --no-plugins uams-web/patches-pestphp-pest:^1.0

A package that another repository installs (an add-on) requires it with --dev and lists the patch files in its own root patches.json. The full procedure is the upstream-patch-lifecycle skill's Moving a consumer to the package.

Patch paths are relative to the consumer's root and start vendor/uams-web/patches-pestphp-pest/patches/, so a consumer with a non-default vendor-dir is not covered.

Patches

Applied in the order of composer.json. A later patch is cut against the output of the earlier ones, so none is reordered without re-cutting those after it.

  • pestphp-pest-composer-autoload-path.patch: Make bin/pest load the autoloader Composer names. Pest's bin/pest includes <project>/vendor/autoload.php whenever that file exists and never reads $GLOBALS['_composer_autoload_path'], the path Composer's bin proxy sets to the autoloader of the project that ran it. A project whose vendor-dir is not vendor (UAMS-Web/uamswp-seopress keeps a committed runtime autoloader in vendor/ and installs its toolchain into vendor-dev/) therefore loads the wrong autoloader and stops with Class "Symfony\Component\Console\Input\ArgvInput" not found before any test runs. The patch prefers realpath($GLOBALS['_composer_autoload_path']) when it is set and keeps the original lookup otherwise. Tracked by #2; the first consumer is UAMS-Web/uamswp-seopress#48.

    When this patch retires: when a pestphp/pest release makes bin/pest honor the path Composer's bin proxy sets, or a project stops using a separate vendor-dir. As of v5.3.7 the variable is not read anywhere in bin/; the related upstream reports pestphp/pest#1130 and pestphp/pest#920 are closed, and the earlier fix pestphp/pest#1834 was closed unmerged. Measured on Windows 11 (PHP 8.4, Composer 2.11): composer install of pestphp/pest 5.3.7 into a project with vendor-dir set to vendor-dev and a stand-in vendor/autoload.php applies the patch, vendor-dev/bin/pest then runs two tests and passes, and without the patch the same command fails on the missing Symfony class. Not measured: a project with the default vendor-dir, other platforms, and Composer's bin proxy on versions other than 2.11.

Versioning and verifying

How a change to the package is numbered is on the wiki's Versioning page, and how to apply the set to its upstream release by hand is Verifying the patch set.

License

MIT, see LICENSE. The patches modify pestphp/pest, which is licensed MIT.