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

chore: onRegister reference instance in this #4972

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Aug 13, 2023

Checklist

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 13, 2023

For onClose avvio has to be patched.

@Eomm Eomm added semver-major Issue or PR that should land as semver major v5.x Issue or pr related to Fastify v5 labels Aug 14, 2023
Eomm
Eomm previously approved these changes Aug 14, 2023
@@ -66,7 +66,9 @@ module.exports = function override (old, fn, opts) {
instance[kFourOhFour].arrange404(instance)
}

for (const hook of instance[kHooks].onRegister) hook.call(this, instance, opts)
Copy link
Member

Choose a reason for hiding this comment

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

mmm this was the parent instance, while the instance was the new one

it does not change too much since we inherit all from the parent

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we'll need to adjust the documentation for that. As if the instance contains props that the parent does not, they might face weird situations

mcollina
mcollina previously approved these changes Aug 16, 2023
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina added this to the v5.0.0 milestone Aug 16, 2023
@Uzlopak Uzlopak marked this pull request as draft August 21, 2023 13:28
Base automatically changed from next to main May 7, 2024 13:07
@mcollina mcollina dismissed stale reviews from Eomm and themself May 7, 2024 13:07

The base branch was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major Issue or PR that should land as semver major v5.x Issue or pr related to Fastify v5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants