Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip keys that are not meant to be references #1

Merged

Conversation

kohlerdominik
Copy link

Hi @NickSdot

you pinged me in cebe#156 (comment). I know, it has been a while since then, but the urge to dive into the topic again wasn't that big, to be honest.

Once again I'm now at the good old problem that we can't update the package, so I'll give it another try. I tried your suggested performance fix, and it works 🎉. Well done!

I found this little bug, though, that resolveRelativeUri() is called also on values that are not meant to be URIs. I guess this was unintentionally introduced when trying to DRY the code by combining

$oContextUri = $oContext->getUri();
$resolvedUri = $context->resolveRelativeUri($value);

before

if ($key === '$ref') { ... }
if ($key === 'externalValue') { ... }

So this PR fixes that

@NickSdot
Copy link
Owner

NickSdot commented Dec 9, 2024

Good catch, thank you! 🎉

@NickSdot NickSdot merged commit 83b12ee into NickSdot:improve-performance Dec 9, 2024
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