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

[PHP 8.1] Add nested attributes support - part #1 #1266

Merged
merged 2 commits into from
Nov 20, 2021

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Nov 18, 2021

See rectorphp/rector#6792

Sister rule from https://wiki.php.net/rfc/new_in_initializers for nesting attributes

 use Symfony\Component\Validator\Constraints as Assert;

-/**
- * @Assert\All({
- *     @Assert\NotNull
- * })
- */
+#[Assert\All([
+    new Assert\NotNull()
+])]

@TomasVotruba TomasVotruba changed the title [PHP 8.1] Add nested attribute support [PHP 8.1] Add nested attributes support Nov 18, 2021
@TomasVotruba TomasVotruba force-pushed the tv-nested-attributes branch 5 times, most recently from f31da5d to d981bbe Compare November 18, 2021 19:09
@TomasVotruba TomasVotruba force-pushed the tv-nested-attributes branch 14 times, most recently from 9a5f927 to 76586a5 Compare November 20, 2021 10:02
@TomasVotruba TomasVotruba changed the title [PHP 8.1] Add nested attributes support [PHP 8.1] Add nested attributes support - part #1 Nov 20, 2021
@TomasVotruba TomasVotruba merged commit f83d744 into main Nov 20, 2021
@TomasVotruba TomasVotruba deleted the tv-nested-attributes branch November 20, 2021 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant