-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Add union types #41424
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
Add union types #41424
Conversation
|
just minor consistency some union definitions have spaces around the pipe character, but some don't |
|
is there a CS rule? |
wouterj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fyi, I've reviewed up to the Console component.
This PR does not only introduce union types, but also some object, string and bool types. Is that intended?
| * @return array|null Array with important QueryBuilder parts or null if | ||
| * they can't be determined | ||
| * | ||
| * @internal This method is public to be usable as callback. It should not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but this one, the one above and the one in EntityType below can also be made private in Symfony 5.4 I think. The required public visibility is from 6 years ago, when $this inside a closure was not yet supported (3172d73).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct, anyone up for a PR doing so?
|
Thank you all and @wouterj especially for the review. This is going to take ages to get right. The more eyes the better :) |
wouterj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more :)
fab0860 to
141fdec
Compare
This PR was merged into the 6.0 branch. Discussion ---------- [Yaml] add types to all arguments | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Extracted from #41424 Commits ------- 129411e [Yaml] add types to all arguments
This PR was merged into the 6.0 branch. Discussion ---------- [Workflow] add types to all arguments | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Extracted from #41424 Commits ------- 6a94b77 [Workflow] add types to all arguments
This PR was merged into the 6.0 branch. Discussion ---------- [VarDumper] add types to all arguments | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Extracted from #41424 Commits ------- e68b368 [VarDumper] add types to all arguments
This PR was merged into the 6.0 branch. Discussion ---------- [Config] Add parameter types | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #41424 | License | MIT | Doc PR | N/A This PR adds parameter types to all methods of the Config component. Commits ------- e7e5256 [Config] Add parameter types
This PR was merged into the 6.0 branch. Discussion ---------- [DependencyInjection] add union types | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #41424 | License | MIT | Doc PR | - Commits ------- e017977 [DependencyInjection] add union types
This PR was merged into the 6.0 branch. Discussion ---------- [HttpFoundation] add union types | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #41424 | License | MIT | Doc PR | - Commits ------- 9f4a5fb [HttpFoundation] add union types
d4dc8b1 to
fc6fa3a
Compare
This PR was merged into the 6.0 branch. Discussion ---------- [FrameworkBundle] add union types | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #41424 | License | MIT | Doc PR | - Commits ------- e85e459 [FrameworkBundle] add union types
This PR was merged into the 6.0 branch. Discussion ---------- [Serializer] add union types | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #41424 | License | MIT | Doc PR | - Commits ------- 4db6d56 [Serializer] add union types
|
Closing as the only remaining changes are for Cache, and there is already #41290. |
This PR was merged into the 6.0 branch. Discussion ---------- [Cache] Leverage union types | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #41424 | License | MIT | Doc PR | - Commits ------- 3275859 [Cache] Leverage union types
This PR was squashed before being merged into the 6.0 branch. Discussion ---------- [Form] add union types | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #41424 | License | MIT | Doc PR | - Commits ------- 0480be6 [Form] add union types
Created using https://github.com/rectorphp/rector/ and manual editing (a lot of them. ;))
For the record, I'm using this command to inspect a specific component:
grep -l 'function [a-zA-Z_].*(\([$]\|.*, [$]\)' -- $(find src/Symfony/Component/Messenger -type f|grep Tests -v)