Skip to content

fix(installer): load ExecWithFallback before the CLI composer step - #2470

Merged
Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix-cli-install-exec-autoload
Sep 21, 2026
Merged

Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix-cli-install-exec-autoload

Conversation

@elcreator

Copy link
Copy Markdown

Summary

Since #2454, install/cli-install.php runs composer update through ExecWithFallback::exec(). That step deliberately runs before the core bootstraps, so nothing has registered core/vendor/autoload.php yet, and a fresh CLI install fatals:

PHP Fatal error: Uncaught Error: Class "ExecWithFallback\ExecWithFallback" not found in /install/cli-install.php:59

CI never hit it because the install job passes --skipComposer=y. Found by phramark provisioning an Evolution stack from the current 3.5.x.

install/src/functions.php gains loadExecWithFallback(), which maps only the package's own PSR-4 directory (requiring the whole vendor autoloader that early would pull Laravel's helper files in over the installer's own info()/warning()), and runComposerUpdate() calls it first — printing the existing "run composer update manually" warning when the package is absent instead of fataling.

Test plan

  • CliInstallExecAutoloadTest: the loader works in a PHP process with no Composer autoloader; reports false for a missing package; and precedes the ExecWithFallback::exec() call in the installer
  • Full Pest suite green (878 passed)
  • composer analyze — no errors

🤖 Generated with Claude Code

cli-install.php runs composer update before the core bootstraps, so the vendor autoloader
is not registered when ExecWithFallback::exec() is called and a fresh install without
--skipComposer=y fataled with 'Class ExecWithFallback\ExecWithFallback not found'.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Seiger
Seiger merged commit b752763 into evolution-cms:3.5.x Sep 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants