Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions GearmanBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace Mmoreram\GearmanBundle;

use Doctrine\Common\Annotations\AnnotationRegistry;
use Mmoreram\GearmanBundle\Driver\Gearman\Job;
use Mmoreram\GearmanBundle\Driver\Gearman\Work;
use Symfony\Component\HttpKernel\Bundle\Bundle;

class GearmanBundle extends Bundle
Expand All @@ -12,16 +14,7 @@ class GearmanBundle extends Bundle
*/
public function boot()
{
$kernel = $this->container->get('kernel');

AnnotationRegistry::registerFile(
$kernel
->locateResource("@GearmanBundle/Driver/Gearman/Work.php")
);

AnnotationRegistry::registerFile(
$kernel
->locateResource("@GearmanBundle/Driver/Gearman/Job.php")
);
AnnotationRegistry::loadAnnotationClass(Work::class);
AnnotationRegistry::loadAnnotationClass(Job::class);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"require": {
"php": "^7.4 || ^8.0",
"ext-gearman": "*",
"doctrine/annotations": "^1.5",
"doctrine/annotations": "^2.0",
"symfony/dependency-injection": "^4.0 || ^5.0 || ^6.0",
"symfony/yaml": "^4.4 || ^5.0 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
Expand Down