Skip to content

Commit 2837041

Browse files
fix: add alias for deprecated Symfony Console add() method (#56488)
1 parent 6ac2f35 commit 2837041

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Illuminate/Console/Application.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,18 @@ public function output()
209209
: '';
210210
}
211211

212+
/**
213+
* Alias for addCommand() since Symfony's add() method was deprecated.
214+
*
215+
* @param \Symfony\Component\Console\Command\Command $command
216+
* @return \Symfony\Component\Console\Command\Command|null
217+
*/
218+
#[\Override]
219+
public function add(SymfonyCommand $command): ?SymfonyCommand
220+
{
221+
return $this->addCommand($command);
222+
}
223+
212224
/**
213225
* Add a command to the console.
214226
*

0 commit comments

Comments
 (0)