Bedrock mu-plugin autolader ignoring wpackagist

Hey @evance I actually figured out the syntax and forgot to update this thread! heres the relevant section, as I have it configured in composer.json:

"require": {
  "php": ">=5.6",
  "composer/installers": "^1.4",
  "vlucas/phpdotenv": "^2.0.1",
  "johnpbloch/wordpress": "4.9.4",
  "oscarotero/env": "^1.1.0",
  "roots/wp-password-bcrypt": "1.0.0",
  "roots/soil": "*",
  "wpackagist-plugin/wp-retina-2x": "*",
  "wpackagist-plugin/wordpress-seo": "*",
  "wpackagist-plugin/contact-form-7": "*"
},
"require-dev": {
  "squizlabs/php_codesniffer": "^3.0.2"
},
"extra": {
  "installer-paths": {
    "web/app/mu-plugins/{$name}/": [
      "type:wordpress-muplugin", "roots/soil",
      "type:wordpress-muplugin", "wpackagist-plugin/wp-retina-2x",
      "type:wordpress-muplugin", "wpackagist-plugin/wordpress-seo",
      "type:wordpress-muplugin", "wpackagist-plugin/contact-form-7"
    ],
    "web/app/plugins/{$name}/": ["type:wordpress-plugin"],
    "web/app/themes/{$name}/": ["type:wordpress-theme"]
  },
  "wordpress-install-dir": "web/wp"
},
"scripts": {
  "post-root-package-install": [
    "php -r \"copy('.env.example', '.env');\""
  ],
  "test": [
    "phpcs"
  ]
}

As you can see, the plugins need to be referenced both in require and under installer-paths=>mu-plugins. As well as this, each one must have a preceding “type:wordpress-muplugin” in the array list

4 Likes