Skip to content

fix: resolve members declared in parent interfaces - #827

Merged
romm merged 1 commit into
CuyZ:masterfrom
romm:fix/interface-extending-interface
Jul 28, 2026
Merged

fix: resolve members declared in parent interfaces#827
romm merged 1 commit into
CuyZ:masterfrom
romm:fix/interface-extending-interface

Conversation

@romm

@romm romm commented Jul 28, 2026

Copy link
Copy Markdown
Member

Mapping to an interface crashed as soon as one of its members was declared in a parent interface, because the parent type resolver assumed single class inheritance: ReflectionClass::getParentClass() returns false for an interface, leading to an assertion error or a TypeError further down.

The resolver now handles interfaces separately, finding the direct parent interface that declares the member before resolving its type, including its generics when an @extends tag is present.

Fixes #822

@romm
romm force-pushed the fix/interface-extending-interface branch from 606561a to 1719189 Compare July 28, 2026 19:23
Mapping to an interface crashed as soon as one of its members was
declared in a parent interface, because the parent type resolver assumed
single class inheritance: `ReflectionClass::getParentClass()` returns
`false` for an interface, leading to an assertion error or a
`TypeError` further down.

The resolver now handles interfaces separately, finding the direct
parent interface that declares the member before resolving its type,
including its generics when an `@extends` tag is present.
@romm
romm force-pushed the fix/interface-extending-interface branch from 1719189 to a3c139d Compare July 28, 2026 19:32
@romm
romm merged commit d46acf3 into CuyZ:master Jul 28, 2026
16 checks passed
@romm
romm deleted the fix/interface-extending-interface branch July 28, 2026 19:39
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.

Extending an Interface from v2.2.1 onwards fails ie: interface ITest extends IBase {}

1 participant