8000 [Question] Custom Installers & Plugin Capabilities · Issue #545 · symfony/flex · GitHub
[go: up one dir, main page]

Skip to content

[Question] Custom Installers & Plugin Capabilities #545

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

Closed
maxhelias opened this issue Jul 17, 2019 · 3 comments
Closed

[Question] Custom Installers & Plugin Capabilities #545

maxhelias opened this issue Jul 17, 2019 · 3 comments

Comments

@maxhelias
Copy link
Contributor

On the documentation of Composer, they talk about two concepts that are quite interesting, the custom installers distributed in a plugin and the capabilities of a plugin.

For the command part, the documentation does not mention the construct parameters that are passed to the provider and that would make the integration possible with Flex to inject command dependencies (this could also be useful for issue #518) .
https://github.com/composer/composer/blob/e022c073706769d0486de96de0f98719cd9950b5/src/Composer/Plugin/PluginManager.php#L375

Is there a particular reason to not use these concepts for Flex ? If we can use them, with a little help, I could study the question more seriously and work on it 😃

@nicolas-grekas
Copy link
Member

Flex is compatible with Composer 1.0, which doesn't have plugin capabilities.
About installers, why would it be useful?

@stof
Copy link
Member
stof commented Jul 17, 2019

the custom installer concept is not used by Flex because Flex does not customize the installation layer at all. It customizes the downloader (to perform parallel downloading when possible, until Composer 2 has it in core), the loading of metadata in repositories, customizes the default options of some commands (disabling display of suggestions for instance), registers some extra commands and reacts to some of the events (using the standard composer way for plugin).

The CommandProvider capability would indeed be a way to implement the registers some extra commands part in a cleaner way in newer composer versions. But the other stuff would still require the logic we have today (command providers cannot replace built-in composer commands). And this would be incompatible with older composer versions (with no easy way to provide a good handling of that case).

@maxhelias
Copy link
Contributor Author

Thanks for the information, it's now much clearer

tgalopin pushed a commit to tgalopin/flex that referenced this issue Dec 3, 2020
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

No branches or pull requests

3 participants
0