8000 [FrameworkBundle] Removed detection of Serializer < 3.2 · symfony/symfony@9badd71 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9badd71

Browse files
committed
[FrameworkBundle] Removed detection of Serializer < 3.2
1 parent c08d8d1 commit 9badd71

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,13 @@
1616
use Symfony\Component\Cache\Adapter\ArrayAdapter;
1717
use Symfony\Component\Cache\Adapter\NullAdapter;
1818
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
19-
use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory;
2019
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
2120
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
2221

2322
class SerializerCacheWarmerTest extends TestCase
2423
{
2524
public function testWarmUp()
2625
{
27-
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
28-
$this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.');
29-
}
30-
3126
$loaders = [
3227
new XmlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/person.xml'),
3328
new YamlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/author.yml'),
@@ -58,10 +53,6 @@ public function testWarmUp()
5853

5954
public function testWarmUpWithoutLoader()
6055
{
61-
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
62-
$this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.');
63-
}
64-
6556
$file = sys_get_temp_dir().'/cache-serializer-without-loader.php';
6657
@unlink($file);
6758

@@ -84,10 +75,6 @@ public function testWarmUpWithoutLoader()
8475
*/
8576
public function testClassAutoloadException()
8677
{
87-
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
88-
$this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.');
89-
}
90-
9178
$this->assertFalse(class_exists($mappedClass = 'AClassThatDoesNotExist_FWB_CacheWarmer_SerializerCacheWarmerTest', false));
9279

9380
$warmer = new SerializerCacheWarmer([new YamlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/does_not_exist.yaml')], tempnam(sys_get_temp_dir(), __FUNCTION__), new ArrayAdapter());
@@ -112,10 +99,6 @@ public function testClassAutoloadExceptionWithUnrelatedException()
11299
$this->expectException(\DomainException::class);
113100
$this->expectExceptionMessage('This exception should not be caught by the warmer.');
114101

115-
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
116-
$this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.');
117-
}
118-
119102
$this->assertFalse(class_exists($mappedClass = 'AClassThatDoesNotExist_FWB_CacheWarmer_SerializerCacheWarmerTest', false));
120103

121104
$warmer = new SerializerCacheWarmer([new YamlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/does_not_exist.yaml')], tempnam(sys_get_temp_dir(), __FUNCTION__), new ArrayAdapter());

0 commit comments

Comments
 (0)
0