8000 [PropertyInfo] Extract property type from property declaration by tsantos84 · Pull Request #31798 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[PropertyInfo] Extract property type from property declaration #31798

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

Closed
wants to merge 15 commits into from
Closed
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
Prev Previous commit
Next Next commit
[PropertyInfo] Add test case for iterable type
  • Loading branch information
tsantos84 committed Jun 7, 2019
commit f2b5c1af61e796cb01f72ea41b1d15fb0848243c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ public function declaredTypeProvider()
['string', [new Type(Type::BUILTIN_TYPE_STRING, true)]],
['dummy', [new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class)]],
['optionalDummy', [new Type(Type::BUILTIN_TYPE_OBJECT, true, Dummy::class)]],
['iterable', [new Type(Type::BUILTIN_TYPE_ITERABLE, false)]],
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ class Php74Dummy
public ?string $string;
public Dummy $dummy;
public ?Dummy $optionalDummy;
Copy link
@mshavliuk mshavliuk Jun 6, 2019

Choose a reason for hiding this comment

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

It looks like you forgot about "callable" property, which is mention in test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, this test case should be removed because declaring callable for a property is not allowed. https://wiki.php.net/rfc/typed_properties_v2

public iterable $iterable;
}
0