Skip to content

Commit c17f5b9

Browse files
committed
Enhance support for old Symfony versions
1 parent 4ff0c09 commit c17f5b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/teleport

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use Endroid\Teleporter\Command\TeleportCommand;
2222
use Endroid\Teleporter\Teleporter;
2323

2424
$console = new Application('Endroid Teleporter');
25-
$console->addCommand(new TeleportCommand(new Teleporter()));
25+
$command = new TeleportCommand(new Teleporter());
26+
method_exists($console, 'addCommand') ? $console->addCommand($command) : $console->add($command);
2627
$console->setDefaultCommand('endroid:teleport', true);
2728
$console->run();

0 commit comments

Comments
 (0)