Skip to content

Scope hydration goto labels - #95

Merged
WyriHaximus merged 1 commit into
EventSaucePHP:mainfrom
WyriHaximus-labs:scope-hydration-gotos
Oct 16, 2026
Merged

WyriHaximus merged 1 commit into
EventSaucePHP:mainfrom
WyriHaximus-labs:scope-hydration-gotos

Conversation

@WyriHaximus

Copy link
Copy Markdown
Collaborator

When generating an object mapper, it uses the property name with a prefix as the goto label. If there are, however, multiple objects code is generated for with the same mame, they will cause a fatal error:

Fatal error: Label 'after_identifier' already defined

This changeset suffixes it with the full class name to keep it unique.

@WyriHaximus WyriHaximus added the bug Something isn't working label Oct 16, 2026
@WyriHaximus
WyriHaximus force-pushed the scope-hydration-gotos branch from b22121a to 9207660 Compare October 16, 2026 13:32
When generating an object mapper, it uses the property name with a prefix as the goto label. If there are, however, multiple objects code is generated for with the same mame, they will cause a fatal error:

```
Fatal error: Label 'after_identifier' already defined
```

This changeset suffixes it with the full class name to keep it unique.
@WyriHaximus
WyriHaximus force-pushed the scope-hydration-gotos branch from 9207660 to 43f97b6 Compare October 16, 2026 13:46
@frankdejonge

Copy link
Copy Markdown
Member

@WyriHaximus sounds logical, fix looks right to me!

@WyriHaximus
WyriHaximus merged commit c02f1a7 into EventSaucePHP:main Oct 16, 2026
6 checks passed
@WyriHaximus
WyriHaximus deleted the scope-hydration-gotos branch October 16, 2026 16:00
@WyriHaximus

Copy link
Copy Markdown
Collaborator Author

Ok awesome, do you prefer to give this fix a patch release on it's own. Or group it with other outstanding work to release?

@frankdejonge

Copy link
Copy Markdown
Member

@WyriHaximus fine to release with the rest, have at it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

2 participants