Closed vinkla closed 5 years ago
Hi @vinkla Thanks. Have you read the hint inside the readme? You can install the mu plugin via Composer, it is available via packagist. Maybe I'm understand your question not correctly, please extend it. Best.
I know it is installable via Composer. Let me try to explain it in more detail. Right now, when you install the package via Composer it is installed as a WordPress plugin with the wordpress-plugin
type. Instead it would be cool if it wasn't a WordPress plugin at all. It could "just" be a Composer package and the package would autoload mu-plugins
automatically without having to activate the must-use-loader
plugin.
However if you use composer installer, there have been the option wordpress-muplugin
, instead of wordpress-plugin
, install in the mu-plugin directory. See the readme from https://github.com/composer/installers
But my plugin have inside his composer.json declare the type of the repository - see https://github.com/bueltge/must-use-loader/blob/master/composer.json#L11 So if you set the repo as require
that will install as mu-plugin, if you use composer/installers
also inside your composer.json file.
I mean like this:
{
"name": "bueltge/must-use-loader",
"type": "wordpress-muplugin",
"require": {
"composer/installers": "v1.0.6"
}
}
What you think? I have currently not a working install or time for check this. As small hint, this post should help and here is an full working example of a composer.json.
Maybe, not sure how it could be implemented. It could work.
Great, I will wait for your feedback.
can we reopen this?
I have a problem with the composer install routine. When I use the must-use-loader as a common wordpress-muplugin
it will be installed in wp-content/mu-plugins/must-use-loader/
which does not work. the must-use-loader.php
file must end up in wp-content/mu-plugins/
@cfoellmann I suggest you take a look at WordPlate. It comes with must-use plugin autoloader built-in.
We should reopen it if it not work.
thanks @vinkla . Will have a look at your project. But I want to sort this out for the must-use-loader otherwise composer support as wordpress-muplugin is pointless
Cleaning up my issues and closing this.
This plugin looks great and it has a lot of potential! Have you considered adding support for autoloading the plugin via Composer? Then we could skip the step to active the plugin via the WordPress dashboard.