Skip to content

Commit c0ec3cf

Browse files
authored
Merge pull request #727 from cakephp/ADmad-patch-1
Explicity add command to avoid directory scanning
2 parents 586c62b + fd8a5d5 commit c0ec3cf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Plugin.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
*/
1616
namespace DebugKit;
1717

18+
use Cake\Console\CommandCollection;
1819
use Cake\Core\BasePlugin;
1920
use Cake\Core\Configure;
2021
use Cake\Core\PluginApplicationInterface;
2122
use Cake\Event\EventManager;
2223
use Cake\Http\MiddlewareQueue;
24+
use DebugKit\Command\BenchmarkCommand;
2325
use DebugKit\Middleware\DebugKitMiddleware;
2426
use DebugKit\Panel\DeprecationsPanel;
2527

@@ -70,6 +72,17 @@ public function middleware(MiddlewareQueue $middleware): MiddlewareQueue
7072
return $middleware;
7173
}
7274

75+
/**
76+
* Add console commands for the plugin.
77+
*
78+
* @param \Cake\Console\CommandCollection $commands The command collection to update
79+
* @return \Cake\Console\CommandCollection
80+
*/
81+
public function console(CommandCollection $commands): CommandCollection
82+
{
83+
return $commands->add('benchmark', BenchmarkCommand::class);
84+
}
85+
7386
/**
7487
* set deprecation handler
7588
*

0 commit comments

Comments
 (0)