File tree Expand file tree Collapse file tree 4 files changed +9
-16
lines changed Expand file tree Collapse file tree 4 files changed +9
-16
lines changed Original file line number Diff line number Diff line change 33namespace Mmoreram \GearmanBundle ;
44
55use Doctrine \Common \Annotations \AnnotationRegistry ;
6+ use Mmoreram \GearmanBundle \Driver \Gearman \Work ;
7+ use Mmoreram \GearmanBundle \Driver \Gearman \Job ;
68use Symfony \Component \HttpKernel \Bundle \Bundle ;
79
810class GearmanBundle extends Bundle
@@ -12,16 +14,7 @@ class GearmanBundle extends Bundle
1214 */
1315 public function boot ()
1416 {
15- $ kernel = $ this ->container ->get ('kernel ' );
16-
17- AnnotationRegistry::registerFile (
18- $ kernel
19- ->locateResource ("@GearmanBundle/Driver/Gearman/Work.php " )
20- );
21-
22- AnnotationRegistry::registerFile (
23- $ kernel
24- ->locateResource ("@GearmanBundle/Driver/Gearman/Job.php " )
25- );
17+ AnnotationRegistry::loadAnnotationClass (Work::class);
18+ AnnotationRegistry::loadAnnotationClass (Job::class);
2619 }
2720}
Original file line number Diff line number Diff line change 1313
1414namespace Mmoreram \GearmanBundle \Tests \Module ;
1515
16- use Doctrine \Common \Annotations \SimpleAnnotationReader ;
16+ use Doctrine \Common \Annotations \AnnotationReader ;
1717
1818use Mmoreram \GearmanBundle \Driver \Gearman \Work as WorkAnnotation ;
1919use Mmoreram \GearmanBundle \Module \WorkerClass ;
@@ -38,7 +38,7 @@ class WorkerClassTest extends \PHPUnit\Framework\TestCase
3838 private $ reflectionClass ;
3939
4040 /**
41- * @var SimpleAnnotationReader
41+ * @var AnnotationReader
4242 *
4343 * Reader
4444 */
@@ -115,7 +115,7 @@ public function setUp(): void
115115 ->getMock ();
116116
117117 $ this ->reader = $ this
118- ->getMockBuilder ('Doctrine\Common\Annotations\SimpleAnnotationReader ' )
118+ ->getMockBuilder ('Doctrine\Common\Annotations\AnnotationReader ' )
119119 ->disableOriginalConstructor ()
120120 ->setMethods ([
121121 'getMethodAnnotations ' ,
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ public function testParseNamespaceMapSomePaths()
188188 $ excludedPaths = [];
189189
190190 $ reader = $ this
191- ->getMockBuilder ('\Doctrine\Common\Annotations\SimpleAnnotationReader ' )
191+ ->getMockBuilder ('\Doctrine\Common\Annotations\AnnotationReader ' )
192192 ->setMethods (null )
193193 ->getMock ();
194194
Original file line number Diff line number Diff line change 2525 "require" : {
2626 "php" : " ^7.4 || ^8.0" ,
2727 "ext-gearman" : " *" ,
28- "doctrine/annotations" : " ^1.5 " ,
28+ "doctrine/annotations" : " ^2.0 " ,
2929 "symfony/dependency-injection" : " ^4.0 || ^5.0 || ^6.0" ,
3030 "symfony/yaml" : " ^4.4 || ^5.0 || ^6.0" ,
3131 "symfony/framework-bundle" : " ^4.4 || ^5.0 || ^6.0" ,
You can’t perform that action at this time.
0 commit comments