Stricter return type for getBackingType#1608
Closed
SamMousa wants to merge 7 commits into
Closed
Conversation
The only backing types for Enums are `int` and `string`. The proper return type for `ReflectionEnum::getBackingType()` is thus `null|ReflectionNamedType`.
SamMousa
added a commit
to SamMousa/php-src
that referenced
this pull request
Jun 2, 2022
The only backing types for Enums are int and string. The proper return type for ReflectionEnum::getBackingType() is thus null|ReflectionNamedType. See also php/doc-en#1608
iluuu1994
pushed a commit
to php/php-src
that referenced
this pull request
Jun 2, 2022
The only backing types for Enums are int and string. The proper return type for ReflectionEnum::getBackingType() is thus null|ReflectionNamedType. See also php/doc-en#1608 Closes GH-8687
iluuu1994
approved these changes
Jun 2, 2022
Member
|
Since that change will only be available as of PHP 8.2.0, the PR should not yet be merged; I've set the 8.2 milestone. Also, we need a changelog entry, which informs users about that change. You can copy the skeleton, and flesh it out. |
Author
|
Have added the entry, but couldn't get phd to compile the source code to inspect the result. |
getBackingTypegetBackingType
cmb69
reviewed
Jun 6, 2022
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Member
We should reconsider #877. |
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Author
|
Or provide a dockerized build command. Then you have 1 requirement that almost any developer will have installed or can easily install. |
Member
|
Please move the Changelog section above the examples, to pass the QA test |
Girgias
reviewed
Jun 15, 2022
saundefined
reviewed
Jun 22, 2022
Co-authored-by: Sergey Panteleev <sergey@php.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The only backing types for Enums are
intandstring. The proper return type forReflectionEnum::getBackingType()is thusnull|ReflectionNamedType.