File tree Expand file tree Collapse file tree 6 files changed +22
-0
lines changed Expand file tree Collapse file tree 6 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1313 "require" : {
1414 "php" : " ^8.0" ,
1515 "composer-runtime-api" : " ^2.0" ,
16+ "symfony/config" : " ^5.0|^6.0" ,
17+ "symfony/dependency-injection" : " ^5.0|^6.0" ,
18+ "symfony/http-kernel" : " ^5.0|^6.0" ,
1619 "symfony/framework-bundle" : " ^5.0|^6.0" ,
1720 "yokai/batch" : " ^0.4.0"
1821 },
Original file line number Diff line number Diff line change 1010use Symfony \Component \DependencyInjection \Definition ;
1111use Symfony \Component \DependencyInjection \Reference ;
1212use Yokai \Batch \Bridge \Symfony \Framework \JobWithStaticNameInterface ;
13+ use Yokai \Batch \Job \JobInterface ;
14+ use Yokai \Batch \Registry \JobRegistry ;
1315
16+ /**
17+ * Find tagged {@see JobInterface} and register these in {@see JobRegistry}.
18+ */
1419final class RegisterJobsCompilerPass implements CompilerPassInterface
1520{
1621 /**
Original file line number Diff line number Diff line change 88use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
99use Symfony \Component \Config \Definition \ConfigurationInterface ;
1010
11+ /**
12+ * Configuration for yokai/batch Symfony Bundle.
13+ */
1114final class Configuration implements ConfigurationInterface
1215{
1316 /**
Original file line number Diff line number Diff line change 2020use Yokai \Batch \Storage \ListableJobExecutionStorageInterface ;
2121use Yokai \Batch \Storage \QueryableJobExecutionStorageInterface ;
2222
23+ /**
24+ * Dependency injection extension for yokai/batch Symfony Bundle.
25+ */
2326final class YokaiBatchExtension extends Extension
2427{
2528 /**
Original file line number Diff line number Diff line change 44
55namespace Yokai \Batch \Bridge \Symfony \Framework ;
66
7+ use Yokai \Batch \Registry \JobRegistry ;
8+
79/**
810 * A job that implement this interface can define the associated job name via a static method.
911 * This is very useful if you are registering jobs using PSR services registering.
1214 */
1315interface JobWithStaticNameInterface
1416{
17+ /**
18+ * The job name as it will be registered in the {@see JobRegistry}.
19+ */
1520 public static function getJobName (): string ;
1621}
Original file line number Diff line number Diff line change 88use Symfony \Component \HttpKernel \Bundle \Bundle ;
99use Yokai \Batch \Bridge \Symfony \Framework \DependencyInjection \CompilerPass \RegisterJobsCompilerPass ;
1010
11+ /**
12+ * yokai/batch Symfony Bundle.
13+ */
1114final class YokaiBatchBundle extends Bundle
1215{
1316 public function build (ContainerBuilder $ container ): void
You can’t perform that action at this time.
0 commit comments