Skip to content

Commit 1498a25

Browse files
Merge branch '6.4' into 7.0
* 6.4: [Console] Fix horizontal table top border is incorrectly rendered [Tests] Streamline [AssetMapper] Fixing bug where JSCompiler used non-absolute importmap entry path [FrameworkBundle] Fix BC break about enable_annotations in validation and serializer configuration [Uid] Fix UuidV7 collisions within the same ms [Validator] updated Romanian translation
2 parents 4be9882 + 73f881e commit 1498a25

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,23 @@ public function testFixManagersAutoMappings(array $originalEm1, array $originalE
174174
], $expectedEm2));
175175
}
176176

177-
public static function providerBasicDrivers()
177+
public function testMappingTypeDetection()
178+
{
179+
$container = $this->createContainer();
180+
181+
$reflection = new \ReflectionClass($this->extension);
182+
$method = $reflection->getMethod('detectMappingType');
183+
184+
// The ordinary fixtures contain annotation
185+
$mappingType = $method->invoke($this->extension, __DIR__.'/../Fixtures', $container);
186+
$this->assertSame($mappingType, 'attribute');
187+
188+
// In the attribute folder, attributes are used
189+
$mappingType = $method->invoke($this->extension, __DIR__.'/../Fixtures/Attribute', $container);
190+
$this->assertSame($mappingType, 'attribute');
191+
}
192+
193+
public static function providerBasicDrivers(): array
178194
{
179195
return [
180196
['doctrine.orm.cache.apc.class', ['type' => 'apc']],
@@ -253,7 +269,7 @@ public function testUnrecognizedCacheDriverException()
253269
$this->invokeLoadCacheDriver($objectManager, $container, $cacheName);
254270
}
255271

256-
public static function providerBundles()
272+
public static function providerBundles(): iterable
257273
{
258274
yield ['AnnotationsBundle', 'attribute', '/Entity'];
259275
yield ['AnnotationsOneLineBundle', 'attribute', '/Entity'];

Tests/Form/Type/EntityTypeTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function testChoiceTranslationDomainIsDisabledByDefault($expanded)
143143
}
144144
}
145145

146-
public static function choiceTranslationDomainProvider()
146+
public static function choiceTranslationDomainProvider(): array
147147
{
148148
return [
149149
[false],
@@ -223,8 +223,6 @@ public function testConfigureQueryBuilderWithClosureReturningNonQueryBuilder()
223223
'class' => self::SINGLE_IDENT_CLASS,
224224
'query_builder' => fn () => new \stdClass(),
225225
]);
226-
227-
$field->submit('2');
228226
}
229227

230228
public function testConfigureQueryBuilderWithClosureReturningNullUseDefault()

Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ public function testValidateResultTypes($entity1, $result)
471471
$this->assertNoViolation();
472472
}
473473

474-
public static function resultTypesProvider()
474+
public static function resultTypesProvider(): array
475475
{
476476
$entity = new SingleIntIdEntity(1, 'foo');
477477

0 commit comments

Comments
 (0)