Skip to content

Stricter return type for getBackingType#1608

Closed
SamMousa wants to merge 7 commits into
php:masterfrom
SamMousa:patch-1
Closed

Stricter return type for getBackingType#1608
SamMousa wants to merge 7 commits into
php:masterfrom
SamMousa:patch-1

Conversation

@SamMousa
Copy link
Copy Markdown

@SamMousa SamMousa commented Jun 2, 2022

The only backing types for Enums are int and string. The proper return type for ReflectionEnum::getBackingType() is thus null|ReflectionNamedType.

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
@cmb69 cmb69 added this to the PHP 8.2 milestone Jun 2, 2022
@cmb69
Copy link
Copy Markdown
Member

cmb69 commented Jun 2, 2022

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.

@SamMousa
Copy link
Copy Markdown
Author

SamMousa commented Jun 3, 2022

Have added the entry, but couldn't get phd to compile the source code to inspect the result.

@SamMousa SamMousa changed the title Better return types for getBackingType Stricter return type for getBackingType Jun 3, 2022
Comment thread reference/reflection/reflectionenum/getbackingtype.xml Outdated
Comment thread reference/reflection/reflectionenum/getbackingtype.xml Outdated
Comment thread reference/reflection/reflectionenum/getbackingtype.xml Outdated
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
@cmb69
Copy link
Copy Markdown
Member

cmb69 commented Jun 6, 2022

, but couldn't get phd to compile the source code to inspect the result.

We should reconsider #877.

SamMousa and others added 2 commits June 6, 2022 15:36
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
@SamMousa
Copy link
Copy Markdown
Author

SamMousa commented Jun 6, 2022

Or provide a dockerized build command. Then you have 1 requirement that almost any developer will have installed or can easily install.

@saundefined
Copy link
Copy Markdown
Member

Please move the Changelog section above the examples, to pass the QA test

Comment thread reference/reflection/reflectionenum/getbackingtype.xml
Comment thread reference/reflection/reflectionenum/getbackingtype.xml
Co-authored-by: Sergey Panteleev <sergey@php.net>
@SamMousa SamMousa closed this by deleting the head repository Sep 20, 2022
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.

6 participants