Skip to content

Commit

Permalink
Explicity add command to avoid directory scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad authored Jan 15, 2020
1 parent 586c62b commit fd8a5d5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
*/
namespace DebugKit;

use Cake\Console\CommandCollection;
use Cake\Core\BasePlugin;
use Cake\Core\Configure;
use Cake\Core\PluginApplicationInterface;
use Cake\Event\EventManager;
use Cake\Http\MiddlewareQueue;
use DebugKit\Command\BenchmarkCommand;
use DebugKit\Middleware\DebugKitMiddleware;
use DebugKit\Panel\DeprecationsPanel;

Expand Down Expand Up @@ -70,6 +72,17 @@ public function middleware(MiddlewareQueue $middleware): MiddlewareQueue
return $middleware;
}

/**
* Add console commands for the plugin.
*
* @param \Cake\Console\CommandCollection $commands The command collection to update
* @return \Cake\Console\CommandCollection
*/
public function console(CommandCollection $commands): CommandCollection
{
return $commands->add('benchmark', BenchmarkCommand::class);
}

/**
* set deprecation handler
*
Expand Down

0 comments on commit fd8a5d5

Please sign in to comment.