szepeviktor / composer-envato

Composer plugin for Envato 💚 Install WordPress themes and plugins from ThemeForest‎‎ and CodeCanyon
https://packagist.org/packages/szepeviktor/composer-envato
MIT License
32 stars 3 forks source link

Global installation of Composer plugin #13

Closed mcaskill closed 1 year ago

mcaskill commented 1 year ago

This Composer plugin must be installed globally as it adds a virtual package repository.

I see that this notice was present early on.

Out of curiosity, I browsed the source code then I tested this plugin as a project requirement instead of installing it globally. It appears to work well.

What about this plugin requires it to be globally installed?

I have not looked at earlier versions; this was probably a necessity with Composer v1.

Furthermore, if this plugin can be safely installed per project, could the Envato personal access token be optionally outsourced to an environment variable (such as from a .env file loaded with vlucas/phpdotenv)?

szepeviktor commented 1 year ago

I do not know! What are your wishes?

mcaskill commented 1 year ago

Well, maybe the README can mention that the plugin can be installed either globally or per project, or left unchanged.

I was about to test adding support for Dotenv to fetch the token from from an environment variable. What do you think?

szepeviktor commented 1 year ago

I know there is a technology in Composer v2 to execute plugins early. I leave this 100% up to you! Just leave a short notice in README that with Composer v2 global installation might be not necessary.

szepeviktor commented 1 year ago

Be aware! There is not a single high quality plugin/theme on Envato.

mcaskill commented 1 year ago

I'm, sadly, well aware of the quality of plugins and themes on Envato and across the WordPress ecosystem.

mcaskill commented 1 year ago

Resolved in #14