Skip to content

NGSTACK-1062 change type to string[] - #46

Merged
pspanja merged 1 commit into
masterfrom
NGSTACK-1062-ibexa-location-path
Oct 14, 2026
Merged

pspanja merged 1 commit into
masterfrom
NGSTACK-1062-ibexa-location-path

Conversation

@amalija-ramljak

Copy link
Copy Markdown
Member

Changing type of pathArray to string array - because that is what I get in the code, and that is what it seems to be when I track down the types. The int[] type confuses phpstan when I use a string variable as the needle for in_array with pathArray as the haystack

The implementation in this bundle for getting pathArray just takes innerLocation->path

This is the typing for getPath on ibexa's Location
https://github.com/ibexa/core/blob/5.0/src/contracts/Repository/Values/Content/Location.php#L237
And this is the typing for path as a magic property
https://github.com/ibexa/core/blob/5.0/src/contracts/Repository/Values/Content/Location.php#L28


Note - ibexa mentions the magic accessing of ->path is deprecated and supposedly removed in 5.x. Should getPath be used instead here then? I think ->path still works, though, as I didn't get errors running the code that accesses ->pathArray as it is implemented now

@pspanja pspanja left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good 👍

@pspanja
pspanja merged commit 8229d05 into master Oct 14, 2026
2 checks passed
@pspanja
pspanja deleted the NGSTACK-1062-ibexa-location-path branch October 14, 2026 06:16
@pspanja

pspanja commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thanks @amalija-ramljak!

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.

2 participants