Skip to content

Instantly share code, notes, and snippets.

@AaronHolbrook
Created January 23, 2018 12:46
Show Gist options
  • Save AaronHolbrook/513f2cf7a5fd1317436198289e25e324 to your computer and use it in GitHub Desktop.
Save AaronHolbrook/513f2cf7a5fd1317436198289e25e324 to your computer and use it in GitHub Desktop.
WP CLI composer autoload bug
<?php
require_once __DIR__ . '/vendor/autoload.php';
/**
* Load dotenv if .env file is present
*/
if ( file_exists( __DIR__ . '/.env.php' ) ) {
Arrilot\DotEnv\DotEnv::load( __DIR__ . '/.env.php' );
}
{
"config": {
"preferred-install": "dist",
"vendor-dir": "mu-plugins/app/vendor"
},
"extra": {
"installer-paths": {
"mu-plugins/{$name}/": [
"type:wordpress-muplugin"
]
}
},
"require": {
"php": ">=5.5",
"composer/installers": "~1.0.12",
"arrilot/dotenv-php": "^1.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment