Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What guardrails need to be in place in order to run Composer without proc_open? #11136

Closed
effulgentsia opened this issue Oct 19, 2022 · 4 comments

Comments

@effulgentsia
Copy link
Contributor

In #9253 (comment), @Seldaek said:

we want to support some basic install code-path without proc_open for sure

Thank you for that!

For Drupal, we're working on adding an Automatic Updates feature and an install-packages-from-the-UI feature. Both involve the Drupal website running Composer commands (update and require), on itself, in production. We're using https://github.com/php-tuf/composer-stager to make that more sane than it might first sound. This is primarily geared towards small sites, typically on cheap shared hosting, who do not have or need a dev to prod deployment process. Some of this target audience uses hosts that disable proc_open.

I'd like to ask for input from Composer maintainers as to what conditions would need to be in place for the sites without proc_open to be able to use these features reliably? The ones that come immediately to mind are:

  • minimum-stability: alpha
  • preferred-install: dist
  • Not using any 3rd party plugins that execute processes

With the above in place, how likely is it that no calls to proc_open will be needed? Are there common conditions where despite the above constraints that Composer would need to call a git command or some other process? Thanks for any insight!

@Seldaek
Copy link
Member

Seldaek commented Oct 25, 2022

I think that should cover it.. but to be honest I might well be missing something :)

@stof
Copy link
Contributor

stof commented Oct 25, 2022

Note that preferred-install: dist won't help if the package you try to install does not provide a dist (any package hosted on github or gitlab.com will have it thanks to those platforms. Packages hosted on a custom Gitlab instance using the vcs repository type will have it only if gitlab-domains is configured to include the domain of that custom instance)

@github-actions
Copy link

This issue has been automatically marked Stale and will be closed in 15 days if no further activity happens.

@github-actions github-actions bot added the Stale label Apr 24, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2023
@stof
Copy link
Contributor

stof commented May 10, 2023

Another requirement: having ext-zip so that archives can be decompressed in PHP instead of using a CLI tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants