From 0f921bf5ba3a462cd563ac67a6a25b5de5d602a6 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 5 Sep 2013 21:56:43 +0200 Subject: [PATCH] Fixed minimum doctrine common version to 2.2.0-dev Removed some unused uses --- Service/GearmanCacheWrapper.php | 18 ++---------------- composer.json | 2 +- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/Service/GearmanCacheWrapper.php b/Service/GearmanCacheWrapper.php index 79c03dd..e61da1f 100644 --- a/Service/GearmanCacheWrapper.php +++ b/Service/GearmanCacheWrapper.php @@ -11,17 +11,13 @@ use Symfony\Component\Config\FileLocator; use Doctrine\Common\Annotations\Reader; -use Doctrine\Common\Annotations\AnnotationReader; use Doctrine\Common\Annotations\AnnotationRegistry; use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader; use Doctrine\Common\Cache\Cache; use Symfony\Component\Finder\Finder; use Doctrine\Common\Annotations\SimpleAnnotationReader; -use \Doctrine\Common\Version as DoctrineVersion; use Mmoreram\GearmanBundle\Module\WorkerCollection; -use Mmoreram\GearmanBundle\Module\WorkerDirectoryLoader; use Mmoreram\GearmanBundle\Module\WorkerClass as Worker; use Mmoreram\GearmanBundle\Driver\Gearman\Work as WorkAnnotation; use ReflectionClass; @@ -226,18 +222,8 @@ private function parseNamespaceMap() AnnotationRegistry::registerFile(__DIR__ . "/../Driver/Gearman/Work.php"); AnnotationRegistry::registerFile(__DIR__ . "/../Driver/Gearman/Job.php"); - /** - * Depending on Symfony2 version - */ - if (version_compare(DoctrineVersion::VERSION, '2.2.0-DEV', '>=')) { - - $reader = new SimpleAnnotationReader(); - $reader->addNamespace('Mmoreram\GearmanBundle\Driver'); - } else { - - $reader = new AnnotationReader(); - $reader->setDefaultAnnotationNamespace('Mmoreram\GearmanBundle\Driver\\'); - } + $reader = new SimpleAnnotationReader(); + $reader->addNamespace('Mmoreram\GearmanBundle\Driver'); $finder = new Finder(); $finder diff --git a/composer.json b/composer.json index 4d29512..0939bf0 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "php": ">=5.3.3", "ext-gearman": "*", "symfony/framework-bundle": ">=2.1", - "doctrine/common": ">=2.1", + "doctrine/common": ">=2.2.0-dev", "symfony/console": ">=2.1", "symfony/config": ">=2.1", "symfony/http-kernel": ">=2.1",