Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"php": "7.1.* || 7.2.* || 7.3.* || 7.4.*",
"nette/http": "3.0.*",
"nette/caching": "3.0.*",
"nette/application": ">3.0.0",
"nette/application": "3.0.*",
"kdyby/console": "2.8.*@dev",
"symfony/console": "~2.3 || ~3.0 || ~4.0"
},
Expand All @@ -23,7 +23,9 @@
},
"suggest": {
"nette/caching": "Caching support",
"nette/di": "Register filter using extension"
"nette/di": "Register filter using extension",
"kdyby/console": "For Symfony Console support",
"contributte/console": "For Symfony Console support"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 5 additions & 2 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,13 @@ public function loadConfiguration(): void
return;
}
$builder = $this->getContainerBuilder();
$builder
$cleanCacheDefinition = $builder
->addDefinition($this->prefix('console.cleanCache'))
->setClass(CleanCacheCommand::class)
->addTag(\Kdyby\Console\DI\ConsoleExtension::COMMAND_TAG)
;

if (\class_exists('\Kdyby\Console\DI\ConsoleExtension')) {
$cleanCacheDefinition->addTag('kdyby.console.command');
}
}
}
1 change: 0 additions & 1 deletion tests/DI/extension.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
extensions:
version: Pd\Version\Extension
console: Kdyby\Console\DI\ConsoleExtension