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

Optional Integration of Composer with PHP Installation #17434

Closed
antonioamandio opened this issue Jan 10, 2025 · 4 comments
Closed

Optional Integration of Composer with PHP Installation #17434

antonioamandio opened this issue Jan 10, 2025 · 4 comments

Comments

@antonioamandio
Copy link

Description

I would like to suggest an improvement in the integration between Composer and PHP. Currently, Composer needs to be installed separately after PHP, which can make the initial setup more labor-intensive, especially for beginners.

My proposal is to add an option to install Composer directly during the PHP installation process. This could be implemented in two ways:

  • Graphical interface installation: Add a checkbox in the PHP installer to allow Composer to be installed alongside PHP.
  • Command-line installation: Include an optional flag, such as --install-composer, to automatically add Composer during the PHP setup process.

This approach would be entirely optional, maintaining flexibility for those who prefer to install Composer separately. For example:

  • Those who want integrated installation can check the checkbox or use the flag.
  • Those who prefer manual configuration can skip this option and proceed as usual.

I believe this functionality would reduce the complexity of the initial setup and encourage more people to use Composer, simplifying the process for beginners.

I am available to discuss this idea further and understand if it is feasible for the team and the community. Below are some ways to contact me:

Best regards,
António Amândio.
January 10, 2024.

@NattyNarwhal
Copy link
Member

PHP doesn't offer any installer officially. There are third-party distributions that offer that, and some offer Composer bundled as well.

That said, currently PEAR/PECL can be bundled when you build PHP, but I don't think many people use PEAR anymore. We currently revised our policy on mentioning third-party projects, so such a thing could be possible, but I don't know what the stance on bundling it would be on the PHP or Composer sides.

@arcanisgk
Copy link

I think that at this point it would be much easier and more convenient to take some features from composer and include them in php... if spl-autoloader already exists for example; its operation could be extended even more if php absorbed the features that composer provides. perhaps this would greatly improve access to everything from PHP if it were now within the same distribution...

@iluuu1994
Copy link
Member

iluuu1994 commented Jan 11, 2025

All that "bundling composer into PHP" would really mean is to adopt it under the PHP umbrella. It doesn't improve the tool, make more people work on it (composer is already perfectly well maintained), or improve the means it is distributed, as we don't even distribute PHP itself. This is all done by Linux distributions or package managers, with the exception of Windows binaries. In fact, development would likely slow down dramatically, because non-trivial changes could no longer be decided by maintainers but would require RFC votes, which kills momentum due to design by committee.

Furthermore, while composer is open source, it is sponsored by and closely related to packagist.com, which is commercial. It's very unlikely that composer maintainers want to give up control over composer, which is a central part of their business strategy. And it goes without saying, replicating the work composer is doing would absolutely be wasted work.

If you still think there is something worth talking about here, please bring it up on the internals mailing list. GitHub is not the intended platform for highly political discussions.

@iluuu1994 iluuu1994 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2025
@antonioamandio
Copy link
Author

Hello,

First of all, I apologize for the delay in responding — I'm only now able to return to this discussion, more than two months after opening the issue.

Thank you for the detailed explanation. I now have a clearer understanding of the challenges and implications involved in any attempt to bring Composer under the PHP umbrella. Your points about the potential negative impact on development and the autonomy of maintainers make perfect sense. I also understand the governance concerns and the connection with Packagist.

I really appreciate your availability and willingness to respond so clearly. Even if the proposal doesn't move forward, this feedback has already been extremely valuable to me.

Thank you very much!

Best regards,
António Amândio

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

5 participants