Skip to content

[make:*] Offer to install missing packages with Composer - #1835

Open
Amoifr wants to merge 1 commit into
symfony:1.xfrom
Amoifr:feature-1832-install-missing-packages
Open

Amoifr wants to merge 1 commit into
symfony:1.xfrom
Amoifr:feature-1832-install-missing-packages

Conversation

@Amoifr

@Amoifr Amoifr commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

When a maker is missing packages, interactive runs now list them and ask whether to install them with Composer, instead of failing with the command to run. On "yes" the packages are required (dev ones with --dev) and the maker is restarted in a new process, since the running kernel was built without them and composer require corrupts its container cache. On "no", and with --no-interaction, the existing error is unchanged.

The restart needs a TTY. Without one (e.g. on Windows), the command stops after the installation and asks to run the maker again.

Only the dependencies declared in configureDependencies() are covered. Makers that check packages later in interact() (e.g. make:auth, make:user) keep their current message, which could be a follow-up.

Tested in a symfony/skeleton 8.1 app: make:form installs form, validator and orm, runs the recipes, restarts and generates the form; declining keeps the error.

Fix #1832

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.

Offer to run composer install ... in case of missing dependency

1 participant