Skip to content

Commit df103d6

Browse files
Bump php to 8.3 version (#38)
1 parent a904340 commit df103d6

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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",

src/Schedule.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
}

symfony.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,18 @@
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": {

0 commit comments

Comments
 (0)