File tree Expand file tree Collapse file tree 4 files changed +43
-3
lines changed Expand file tree Collapse file tree 4 files changed +43
-3
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ jobs:
1616 - name : Set up PHP
1717 uses : shivammathur/setup-php@v2
1818 with :
19- php-version : 8.2
19+ php-version : 8.3
2020 coverage : none
2121
2222 - name : Download dependencies
23- uses : ramsey/composer-install@v2
23+ uses : ramsey/composer-install@v3
2424
2525 - name : Run tests
2626 run : ./bin/console cache:warmup --env dev
Original file line number Diff line number Diff line change 22 "type" : " project" ,
33 "license" : " proprietary" ,
44 "require" : {
5- "php" : " >=8.1 " ,
5+ "php" : " >=8.3 " ,
66 "ext-ctype" : " *" ,
77 "ext-iconv" : " *" ,
88 "composer/package-versions-deprecated" : " 1.11.99.1" ,
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace App ;
4+
5+ use Symfony \Component \Scheduler \Attribute \AsSchedule ;
6+ use Symfony \Component \Scheduler \Schedule as SymfonySchedule ;
7+ use Symfony \Component \Scheduler \ScheduleProviderInterface ;
8+ use Symfony \Contracts \Cache \CacheInterface ;
9+
10+ #[AsSchedule]
11+ class Schedule implements ScheduleProviderInterface
12+ {
13+ public function __construct (
14+ private CacheInterface $ cache ,
15+ ) {
16+ }
17+
18+ public function getSchedule (): SymfonySchedule
19+ {
20+ return (new SymfonySchedule ())
21+ ->stateful ($ this ->cache ) // ensure missed tasks are executed
22+ ->processOnlyLastMissedRun (true ) // ensure only last missed task is run
23+
24+ // add your own tasks here
25+ // see https://symfony.com/doc/current/scheduler.html#attaching-recurring-messages-to-a-schedule
26+ ;
27+ }
28+ }
Original file line number Diff line number Diff line change 433433 "config/routes.yaml"
434434 ]
435435 },
436+ "symfony/scheduler": {
437+ "version": "7.3",
438+ "recipe": {
439+ "repo": "github.com/symfony/recipes",
440+ "branch": "main",
441+ "version": "7.2",
442+ "ref": "caea3c928ee9e1b21288fd76aef36f16ea355515"
443+ },
444+ "files": [
445+ "src/Schedule.php"
446+ ]
447+ },
436448 "symfony/security-bundle": {
437449 "version": "5.4",
438450 "recipe": {
You can’t perform that action at this time.
0 commit comments