Create Flex endpoint

This commit is contained in:
github-action[bot]
2026-09-09 12:27:10 +00:00
commit 9d3adca808
3 changed files with 131 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
{
"aliases": {
"schedule": "symfony/scheduler",
"scheduler": "symfony/scheduler",
"scheduling": "symfony/scheduler"
},
"recipes": {
"symfony/scheduler": [
"7.2",
"8.2"
]
},
"recipe-conflicts": [],
"versions": [],
"branch": "main",
"is_contrib": false,
"_links": {
"repository": "github.com/symfony/recipes",
"origin_template": "{package}:{version}@github.com/symfony/recipes:main",
"recipe_template": "https://raw.githubusercontent.com/symfony/recipes/flex/pull-1573/{package_dotted}.{version}.json",
"recipe_template_relative": "{package_dotted}.{version}.json",
"archived_recipes_template": "https://raw.githubusercontent.com/symfony/recipes/flex/pull-1573/archived/{package_dotted}/{ref}.json",
"archived_recipes_template_relative": "archived/{package_dotted}/{ref}.json"
}
}
+48
View File
@@ -0,0 +1,48 @@
{
"manifests": {
"symfony/scheduler": {
"manifest": {
"copy-from-recipe": {
"src/": "%SRC_DIR%/"
}
},
"files": {
"src/Schedule.php": {
"contents": [
"<?php",
"",
"namespace App;",
"",
"use Symfony\\Component\\Scheduler\\Attribute\\AsSchedule;",
"use Symfony\\Component\\Scheduler\\Schedule as SymfonySchedule;",
"use Symfony\\Component\\Scheduler\\ScheduleProviderInterface;",
"use Symfony\\Contracts\\Cache\\CacheInterface;",
"",
"#[AsSchedule]",
"class Schedule implements ScheduleProviderInterface",
"{",
" public function __construct(",
" private CacheInterface $cache,",
" ) {",
" }",
"",
" public function getSchedule(): SymfonySchedule",
" {",
" return (new SymfonySchedule())",
" ->stateful($this->cache) // ensure missed tasks are executed",
" ->processOnlyLastMissedRun(true) // ensure only last missed task is run",
"",
" // add your own tasks here",
" // see https://symfony.com/doc/current/scheduler.html#attaching-recurring-messages-to-a-schedule",
" ;",
" }",
"}",
""
],
"executable": false
}
},
"ref": "caea3c928ee9e1b21288fd76aef36f16ea355515"
}
}
}
+58
View File
@@ -0,0 +1,58 @@
{
"manifests": {
"symfony/scheduler": {
"manifest": {
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
},
"files": {
"config/packages/scheduler.yaml": {
"contents": [
"framework:",
" scheduler:",
" use_messenger_routing: true",
""
],
"executable": false
},
"src/Schedule.php": {
"contents": [
"<?php",
"",
"namespace App;",
"",
"use Symfony\\Component\\Scheduler\\Attribute\\AsSchedule;",
"use Symfony\\Component\\Scheduler\\Schedule as SymfonySchedule;",
"use Symfony\\Component\\Scheduler\\ScheduleProviderInterface;",
"use Symfony\\Contracts\\Cache\\CacheInterface;",
"",
"#[AsSchedule]",
"class Schedule implements ScheduleProviderInterface",
"{",
" public function __construct(",
" private CacheInterface $cache,",
" ) {",
" }",
"",
" public function getSchedule(): SymfonySchedule",
" {",
" return (new SymfonySchedule())",
" ->stateful($this->cache) // ensure missed tasks are executed",
" ->processOnlyLastMissedRun(true) // ensure only last missed task is run",
"",
" // add your own tasks here",
" // see https://symfony.com/doc/current/scheduler.html#attaching-recurring-messages-to-a-schedule",
" ;",
" }",
"}",
""
],
"executable": false
}
},
"ref": "2f08866d3b0fb1243ab13ce3ecda8a9e9645a61a"
}
}
}