Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Jun 9, 2022

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues -

Why remove isBuiltin() ?

From PHP 8.0 method was removed from the ReflectionType and available in ReflectionNamedType only.

@vjik vjik changed the title Make method DefinitionValidator::validateArrayDefinition() public Make DefinitionValidator::validateArrayDefinition() public and remove ParameterDefinition::isBuiltin() Jun 9, 2022
@vjik vjik requested a review from a team June 9, 2022 14:30
@vjik vjik added the status:code review The pull request needs review. label Jun 9, 2022
if ($type === null) {
return false;
}
return $type->isBuiltin();
Copy link
Member

Choose a reason for hiding this comment

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

Have you considered keeping this method?

public function isBuiltin(): bool
    {
        $type = $this->parameter->getType();
        if ($type === null) {
            return false;
        }
        return !$this->isUnionType() && $type->isBuiltin();
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Have you considered keeping this method?

No. For union type method isBuiltin() doesn't make sense. I think that's why it was removed from ReflectionType.

@vjik vjik merged commit d1953e4 into master Jun 13, 2022
@vjik vjik deleted the public-method branch June 13, 2022 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants