File tree 6 files changed +22
-0
lines changed
6 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 13
13
"require" : {
14
14
"php" : " ^8.0" ,
15
15
"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" ,
16
19
"symfony/framework-bundle" : " ^5.0|^6.0" ,
17
20
"yokai/batch" : " ^0.4.0"
18
21
},
Original file line number Diff line number Diff line change 10
10
use Symfony \Component \DependencyInjection \Definition ;
11
11
use Symfony \Component \DependencyInjection \Reference ;
12
12
use Yokai \Batch \Bridge \Symfony \Framework \JobWithStaticNameInterface ;
13
+ use Yokai \Batch \Job \JobInterface ;
14
+ use Yokai \Batch \Registry \JobRegistry ;
13
15
16
+ /**
17
+ * Find tagged {@see JobInterface} and register these in {@see JobRegistry}.
18
+ */
14
19
final class RegisterJobsCompilerPass implements CompilerPassInterface
15
20
{
16
21
/**
Original file line number Diff line number Diff line change 8
8
use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
9
9
use Symfony \Component \Config \Definition \ConfigurationInterface ;
10
10
11
+ /**
12
+ * Configuration for yokai/batch Symfony Bundle.
13
+ */
11
14
final class Configuration implements ConfigurationInterface
12
15
{
13
16
/**
Original file line number Diff line number Diff line change 20
20
use Yokai \Batch \Storage \ListableJobExecutionStorageInterface ;
21
21
use Yokai \Batch \Storage \QueryableJobExecutionStorageInterface ;
22
22
23
+ /**
24
+ * Dependency injection extension for yokai/batch Symfony Bundle.
25
+ */
23
26
final class YokaiBatchExtension extends Extension
24
27
{
25
28
/**
Original file line number Diff line number Diff line change 4
4
5
5
namespace Yokai \Batch \Bridge \Symfony \Framework ;
6
6
7
+ use Yokai \Batch \Registry \JobRegistry ;
8
+
7
9
/**
8
10
* A job that implement this interface can define the associated job name via a static method.
9
11
* This is very useful if you are registering jobs using PSR services registering.
12
14
*/
13
15
interface JobWithStaticNameInterface
14
16
{
17
+ /**
18
+ * The job name as it will be registered in the {@see JobRegistry}.
19
+ */
15
20
public static function getJobName (): string ;
16
21
}
Original file line number Diff line number Diff line change 8
8
use Symfony \Component \HttpKernel \Bundle \Bundle ;
9
9
use Yokai \Batch \Bridge \Symfony \Framework \DependencyInjection \CompilerPass \RegisterJobsCompilerPass ;
10
10
11
+ /**
12
+ * yokai/batch Symfony Bundle.
13
+ */
11
14
final class YokaiBatchBundle extends Bundle
12
15
{
13
16
public function build (ContainerBuilder $ container ): void
You can’t perform that action at this time.
0 commit comments