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:
16
16
- name : Set up PHP
17
17
uses : shivammathur/setup-php@v2
18
18
with :
19
- php-version : 8.2
19
+ php-version : 8.3
20
20
coverage : none
21
21
22
22
- name : Download dependencies
23
- uses : ramsey/composer-install@v2
23
+ uses : ramsey/composer-install@v3
24
24
25
25
- name : Run tests
26
26
run : ./bin/console cache:warmup --env dev
Original file line number Diff line number Diff line change 2
2
"type" : " project" ,
3
3
"license" : " proprietary" ,
4
4
"require" : {
5
- "php" : " >=8.1 " ,
5
+ "php" : " >=8.3 " ,
6
6
"ext-ctype" : " *" ,
7
7
"ext-iconv" : " *" ,
8
8
"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 433
433
"config/routes.yaml"
434
434
]
435
435
},
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
+ },
436
448
"symfony/security-bundle": {
437
449
"version": "5.4",
438
450
"recipe": {
You can’t perform that action at this time.
0 commit comments