Skip to content

Commit

Permalink
Merge pull request doctrine#255 from FabioBatSilva/hotfix-slc
Browse files Browse the repository at this point in the history
HOTFIX - DoctrineDataCollector backward compatibility
  • Loading branch information
stof committed Jan 28, 2014
2 parents d46f840 + 60250a4 commit 1b76e21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DataCollector/DoctrineDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public function collect(Request $request, Response $response, \Exception $except
}
}

if (version_compare(\Doctrine\ORM\Version::VERSION, '2.5.0-DEV') < 0) {
continue;
}

/** @var $emConfig \Doctrine\ORM\Configuration */
$emConfig = $em->getConfiguration();
$slcEnabled = $emConfig->isSecondLevelCacheEnabled();
Expand Down
4 changes: 4 additions & 0 deletions Tests/DependencyInjection/AbstractDoctrineExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,10 @@ public function testSetNamingStrategy()

public function testSecondLevelCache()
{
if (version_compare(\Doctrine\ORM\Version::VERSION, '2.5.0-DEV') < 0) {
$this->markTestSkipped('Second-level cache requires doctrine-orm 2.5.0 or newer');
}

$container = $this->getContainer();
$loader = new DoctrineExtension();

Expand Down

0 comments on commit 1b76e21

Please sign in to comment.