Skip to content

[TypeDeclaration] Add TypedPropertyFromJMSSerializerAttributeTypeRector#5909

Merged
TomasVotruba merged 9 commits intomainfrom
jms-type
May 24, 2024
Merged

[TypeDeclaration] Add TypedPropertyFromJMSSerializerAttributeTypeRector#5909
TomasVotruba merged 9 commits intomainfrom
jms-type

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik
Copy link
Copy Markdown
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready.

#[\JMS\Serializer\Annotation\Type('string')]
private $name;

public function setName(string $name): void
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

assign typed already covered by other rule

https://getrector.com/demo/96ca5ad6-dd87-406e-88bf-6e073ed17e32

final class SkipWithDefault
{
#[\JMS\Serializer\Annotation\Type('string')]
private $name = 'foo';
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

With default already covered by other rule https://getrector.com/demo/2479ea75-5faa-45b5-8b62-7738cc69d1ec

@TomasVotruba
Copy link
Copy Markdown
Member

Looks great 👍 Thanks for skipping the cases covered by other rules, so we have indepedent rules

@TomasVotruba TomasVotruba merged commit d6fc901 into main May 24, 2024
@TomasVotruba TomasVotruba deleted the jms-type branch May 24, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TypeDeclaration] Add typed property based on serialize attribute

2 participants