Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Persistence/Mapping/ReflectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function getClassNamespace(string $class): string;
public function getClass(string $class): ReflectionClass;

/**
* Returns an accessible property (setAccessible(true)) or null.
* Returns an accessible property or null.
*
* @phpstan-param class-string $class
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Persistence/Mapping/RuntimeReflectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public function getAccessibleProperty(string $class, string $property): RuntimeR
$reflectionProperty = new TypedNoDefaultReflectionProperty($class, $property);
}

$reflectionProperty->setAccessible(true);

return $reflectionProperty;
}

Expand Down
1 change: 0 additions & 1 deletion tests/Persistence/Mapping/ClassMetadataFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ public function testWillNotCacheFallbackMetadata(): void
private static function getCache(AbstractClassMetadataFactory $classMetadataFactory): CacheItemPoolInterface|null
{
$method = new ReflectionMethod($classMetadataFactory, 'getCache');
$method->setAccessible(true);

return $method->invoke($classMetadataFactory);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function testGetValue(): void
public function testSetValueNull(): void
{
$reflection = new TypedNoDefaultReflectionProperty(TypedFoo::class, 'id');
$reflection->setAccessible(true);

$object = new TypedFoo();
$object->setId(1);
Expand All @@ -45,7 +44,6 @@ public function testSetValueNull(): void
public function testSetValueNullOnNullableProperty(): void
{
$reflection = new TypedNoDefaultReflectionProperty(TypedNullableFoo::class, 'value');
$reflection->setAccessible(true);

$object = new TypedNullableFoo();

Expand Down
1 change: 0 additions & 1 deletion tests/Persistence/RuntimeReflectionPropertyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function testGetSetValue(string $name, string $value): void

self::assertSame($value, $reflProperty->getValue($object));

$reflProperty->setAccessible(true);
$reflProperty->setValue($object, 'changedValue');

self::assertSame('changedValue', $reflProperty->getValue($object));
Expand Down