composer.json needs: "type": "wordpress-plugin",
pryley opened this issue · 8 comments
In order to use this plugin with composer, the type needs to be added to the composer.json file:
{
"type": "wordpress-plugin"
}
not true. https://github.com/roots/wp-password-bcrypt#composer-autoloaded
there's over 500k installs of this plugin via composer 😉
I have also been using it through composer for a long time (see Dioscuri).
However, while composer pulls it into the project, composer installers is not able to place it into the mu-plugins directory because the "type" has not been defined in the composer.json file.
As you can see in composer installers readme example, it says that the two required values to put in your composer.json file are the "type" and "require" values.
The "type" value describes what your package is (i.e. "wordpress-plugin") and the "require" value tells composer to load the custom installers.
Your other plugins all include both values in their composer.json while "wp-password-bcrypt" does not.
This is easily verified.
you're trying to load it via composer and use it as a mu-plugin? that's not how this project works
please read the README once again.
Why dont you bash the end result in which you move the plugin to the mu-plugins folder (and make it work due to auto include of *.php) ?
This is the standard way to install a wordpress plugin with composer-installers to the mu-plugins directory: https://github.com/geminilabs/dioscuri/blob/master/composer.json#L68-L75
I would prefer to stick to this method, however, yes I can script the end result to move it manually.
You can use this instead if you want. https://wordpress.org/plugins/password-bcrypt/
It's not maintained by us, but I believe it's the same code.
composer require wpackagist-plugin/password-bcrypt
Just make sure to set it to install to mu-plugins
in your composer.json, which you can do like this...
"extra": {
"installer-paths": {
- "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
+ "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin", "wpackagist-plugin/password-bcrypt"],
"web/app/plugins/{$name}/": ["type:wordpress-plugin"],
"web/app/themes/{$name}/": ["type:wordpress-theme"]
},
"wordpress-install-dir": "web/wp"
},