Add autoloader

This commit is contained in:
Alain Schlesser 2021-04-19 12:42:05 +01:00
parent 1d77fb1a7e
commit f76e2809de
2 changed files with 16 additions and 1 deletions

View file

@ -39,8 +39,11 @@
}
},
"autoload": {
"psr-4": {
"": "src/"
},
"files": [
"command.php"
"profile-command.php"
]
},
"minimum-stability": "dev",

12
profile-command.php Normal file
View file

@ -0,0 +1,12 @@
<?php
if ( ! class_exists( 'WP_CLI' ) ) {
return;
}
$wpcli_profile_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
if ( file_exists( $wpcli_profile_autoloader ) ) {
require_once $wpcli_profile_autoloader;
}
WP_CLI::add_command( 'profile', 'WP_CLI\Profile\Command' );