Skip to content

Commit

Permalink
Fixed minimum doctrine common version to 2.2.0-dev
Browse files Browse the repository at this point in the history
Removed some unused uses
  • Loading branch information
mmoreram committed Sep 5, 2013
1 parent 5884f14 commit 0f921bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
18 changes: 2 additions & 16 deletions Service/GearmanCacheWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0f921bf

Please sign in to comment.