Skip to content
This repository was archived by the owner on Nov 30, 2026. It is now read-only.

Exclude source from dist to prevent warnings about class resolution - #301

Merged
joetannenbaum merged 1 commit into
laravel:mainfrom
JonPurvis:fix/exclude-source-from-dist
Nov 24, 2026
Merged

joetannenbaum merged 1 commit into
laravel:mainfrom
JonPurvis:fix/exclude-source-from-dist

Conversation

@JonPurvis

Copy link
Copy Markdown
Contributor

Hey 👋

I thought I'd attempt to put a fix in place for #299

As the issue mentions, installing the CLI with composer require --dev laravel/cloud-cli added its classes and app/helpers.php to the host app's autoloader. Doing this then caused an "Ambiguous class resolution" warning on AppServiceProvider and put the global helper functions into every request. The binary in builds/cloud is a self-contained phar file, so I don't believe any of this was needed.

I've tested this by building the phar and a git archive dist from this branch, then installing it into a fresh Laravel 13 app. I got no warning, there was no CLI classes in the host's classmap, no helpers defined in the host and vendor/bin/cloud works.

Fixes #299

@joetannenbaum

Copy link
Copy Markdown
Collaborator

Thanks!

@joetannenbaum
joetannenbaum merged commit 5aa06ee into laravel:main Nov 24, 2026
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project-level install adds the CLI's App\ classes and helpers to the host autoloader

2 participants