Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check readonly property via serialization #11617

Open
wants to merge 3 commits into
base: 2.20.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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: 0 additions & 2 deletions tests/Tests/Models/ReadonlyProperties/Library.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Table;
use Doctrine\Tests\Models\ValueObjects\Uuid;

#[Entity]
#[Table(name: 'library')]
class Library
{
#[Column]
Expand Down
3 changes: 3 additions & 0 deletions tests/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public function testSecondWriteWithSameValue(object $entity, string $property, m
self::assertSame($value, $reflection->getValue($entity));
}

/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use array{type of arg1, type of arg2, type of arg3...}

* @return Generator<string, array<string, string|object>>
*/
public function sameValueProvider(): Generator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a docblock documenting the return type (it should match the signature of testSecondWriteWithSameValue()

{
yield 'string' => [
Expand Down