Problem/Motivation

Could we please define a composer requirement on the npm-asset/ckeditor-wordcount-plugin instead of defining a custom repository?

"npm-asset/ckeditor-wordcount-plugin": "^1.17" should do fine. Then we can mention that it is enough if the root composer.json is registering the repository of https://asset-packagist.org. This way we do not require any custom repo or the composer-merge-plugin.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

hchonov created an issue. See original summary.

jcnventura’s picture

Version: 8.x-1.x-dev » 2.x-dev
Status: Active » Closed (won't fix)

The module should not define any composer dependencies on any library, other than the one specified in the optional composer.libraries.json file. The use of npm-asset requires the use of a composer plugin and some rules in the project's root composer.json file which would then need to be documented in the module README.md file.

Nothing prevents anyone from adding the library via npm-asset with versions 2.x of the module. On versions 1.x, this is not possible and the user must use the custom repository method explained in the module's page.

hchonov’s picture

I am confused why is it okay for the module to require the use of the merge plugin but not okay to require using the installer plugin? The merge plugin adds a lot of overhead and runs twice over the dependencies.

jcnventura’s picture

@hchonov is my colleague and we've talked about this.

Still, in case anyone stumbles upon this, the reason why it's not OK to require the asset packagist but is OK to suggest the use of the merge plugin is the fact that the last one is only a recommendation, not a requirement.

It is still possible to install the library via the use of a custom repository in the site's composer.json. Using "npm-asset/ckeditor-wordcount-plugin": "^1.17" in the module's composer.json would force all module users to use the asset packagist and the oomphinc/composer-installers-extender plugin to install the library.