Skip to content

Commit 9252cc0

Browse files
committed
[11.x] Fix symfony/console:7.4 compatibility
Symfony Console deprecate `add()` method and instead calls `addCommand()` method from `addCommands()`. This cause the application not to have the correct instance of `$laravel` property. PR: <symfony/symfony#60394> Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
1 parent 49dd2f5 commit 9252cc0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Illuminate/Console/Application.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,20 @@ public function output()
206206
: '';
207207
}
208208

209+
/**
210+
* Add an array of commands to the console.
211+
*
212+
* @param array<int, \Symfony\Component\Console\Command\Command> $commands
213+
* @return void
214+
*/
215+
#[\Override]
216+
public function addCommands(array $commands): void
217+
{
218+
foreach ($commands as $command) {
219+
$this->add($command);
220+
}
221+
}
222+
209223
/**
210224
* Add a command to the console.
211225
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy