Skip to content

Schedule grouping PHPstan issue #53548

@rcerljenko

Description

@rcerljenko

Laravel Version

11.32.0

PHP Version

8.3

Database Driver & Version

No response

Description

PHPstan has issues with the latest "Schedule grouping" feature:

Call to an undefined static method Illuminate\Support\Facades\Schedule::onOneServer(). 

It errors the same with the rest of the group functions such as runInBackground, withoutOverlapping, etc.

Possible solution could be to add these method signatures in the facade docblock?

Illuminate\Support\Facades\Schedule.php

Steps To Reproduce

<?php

// routes/console.php

use Illuminate\Support\Facades\Schedule;
use Illuminate\Console\Scheduling\Schedule as ConsoleSchedule;

Schedule::onOneServer()
	->runInBackground()
	->withoutOverlapping()
	->group(static function (ConsoleSchedule $schedule): void {
		// Schedule definitions
	});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions