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

Composer asks to activate all plugins when installing a skin #55

Open
alecpl opened this issue May 17, 2024 · 8 comments
Open

Composer asks to activate all plugins when installing a skin #55

alecpl opened this issue May 17, 2024 · 8 comments

Comments

@alecpl
Copy link
Member

alecpl commented May 17, 2024

When I do composer require roundcube/larry I'm being asked to activate all plugins. The same if I do composer remove roundcube/larry. A bug or I'm missing something?

@mvorisek any ideas?

@mvorisek
Copy link
Contributor

@alecpl
Copy link
Member Author

alecpl commented May 17, 2024

I have this, I think I might need

"config": {
    "roundcube": {
        "enable-plugin": true
    }

but it's annoying to activate core plugins. It's a problem for developers only as these plugins are in required-dev section, but I wonder if we can improve that somehow.

@alecpl
Copy link
Member Author

alecpl commented May 21, 2024

I think we could just not ask the question if a plugin comes from a repository defined with type:path.

@mvorisek
Copy link
Contributor

If so, then we should not ask if the plugin is defined in root package.

@alecpl
Copy link
Member Author

alecpl commented Jun 23, 2024

Another problem with asking to enable every plugin is that people are inclined to say "Yes" to every question, but... if you enable two attachment handling plugins (we have three in core) there will be an error in logs: "PHP Error: Can use only one plugin for attachments/file uploads! Using 'filesystem_attachments', ignoring others."

We have to solve this or we'll have to remove core plugins from composer.json file.

@mvorisek
Copy link
Contributor

Am I right that before roundcube/roundcubemail@1e36099 the plugins were not active/installed by default?

If so, is there any way to keep the plugins in composer.json but make them disabled by default explicitly?

@alecpl
Copy link
Member Author

alecpl commented Jun 23, 2024

That's right, plugins were not activated by default. There's two plugins that needs to be always enabled, but we do this here https://github.com/roundcube/roundcubemail/blob/master/program/include/rcmail.php#L110

I suppose the issue will not be a problem on a production, as we remove "require-dev" section in our packages, but still it's a problem for developers.

Some plugins are examples only, activating them also does not make sense.

Plugins distributed with Roundcube do not require any special install procedure, all you have to do is to activate it in the config file (and configure the plugin itself). We also put core plugins' dependencies in the main composer.json file (maybe this should change, I'm not sure).

I think we should make all core plugins disabled by default. Or in other words the plugin-installer should ignore them completely. Or maybe do this only for these in "require-dev" section.

@mvorisek
Copy link
Contributor

Can we disable them one by one using our/main composer.json?

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

2 participants