Kdyby / Console

Symfony Console integration for Kdyby components
https://packagist.org/packages/kdyby/console
Other
52 stars 54 forks source link

CliRouter is child of CliRouter is child of ... #84

Closed MilanPala closed 5 years ago

MilanPala commented 5 years ago

image

slepic commented 5 years ago

I've got the same problem. I would redefine the problem not CliRouter child of CliRouter, etc. But rather RouteList child of RouteList, etc...

Ive narrowed the problem to this line: https://github.com/Kdyby/Console/blob/master/src/DI/ConsoleExtension.php#L218

Where the console extension picks the default routelist and replaces it with new one, but at the same time it appends the routelist to itself.

This causes the router to enter infinite loop.

slepic commented 5 years ago

85 fixes the problem and even reverts BC break where console.originalRouter service was made no longer available

https://github.com/Kdyby/Console/blob/v2.7.1/src/DI/ConsoleExtension.php#L206

Spamercz commented 5 years ago

This issue is resolved by this PR https://github.com/Kdyby/Console/pull/85 @MilanPala reported this was working fix. Thank you 👍