Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Scheduler] Infinite loop in PeriodicalTrigger #58981

Copy link
Copy link
Open
@gschouten

Description

@gschouten
Issue body actions

Symfony version(s) affected

7.1

Description

PeriodicalTrigger::getNextRunDate() never returns if the argument is the current date and interval is the current day of the week.

How to reproduce

<?php

require_once __DIR__.'/vendor/autoload.php';

use Symfony\Component\Scheduler\Trigger\PeriodicalTrigger;

$now = new \DateTimeImmutable();

$trigger = new PeriodicalTrigger($now->format('l'), $now);
var_dump($trigger->getNextRunDate($now));

Possible Solution

Break from the while loop if $iterator yields the same value.

Scherm­afbeelding 2024-11-25 om 15 53 20

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.