-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony 5.3 LazyCommands are not parsed #39
Comments
The fix above is working, but it is certainly not be the best way to fix this issue... In https://github.com/mybuilder/cronos-bundle/blob/3.1.2/Command/CommandBase.php#L61, we use the Symfony application to fetch all commands : Since it may now return |
my workaround:
...
use Symfony\Component\Console\Command\LazyCommand;
...
public function export(array $commands, array $options): CronFormatter
{
$cron = $this->createCronConfiguration();
foreach ($commands as $command) {
if ($command instanceof LazyCommand) {
$command = $command->getCommand();
}
if ($command instanceof Command) {
$cron = $this->parseAnnotations($cron, $command, $options);
}
}
return $cron;
}
... |
The @Cron annotations are not parsed on LazyCommands.
Cf. https://symfony.com/blog/new-in-symfony-5-3-lazy-command-description
The text was updated successfully, but these errors were encountered: