Visitar URL original
feat(humafiber): add Fiber v3 support by wheinze · Pull Request #962 · danielgtaylor/huma · GitHub
Skip to content

feat(humafiber): add Fiber v3 support - #962

Merged
robtme merged 13 commits into
danielgtaylor:mainfrom
wheinze:feat/support-fiber-v3
Apr 2, 2026
Merged

robtme merged 13 commits into
danielgtaylor:mainfrom
wheinze:feat/support-fiber-v3

Conversation

@wheinze

@wheinze wheinze commented Feb 16, 2026 •

Copy link
Copy Markdown
Contributor
  • Upgrade the humafiber adapter to use Fiber v3 as the default (New/NewWithGroup/Unwrap)
  • Retain Fiber v2 support via new NewV2/NewV2WithGroup/UnwrapV2 functions in a separate file
  • Update dependencies (gofiber/fiber/v3, etc.)

Based on the approach in 9637414. Preferred to use dedicated files for v2 in order to simplify removal of v2 support at a later point in time.

Note on Go version and dependency bumps

I noticed that there's a preference to keep dependency and Go version changes out of feature PRs (as noted in #959). In this case the Go version bump to 1.25 is required because Fiber v3 declares go 1.25.0 in its own go.mod, so the module won't resolve without it. The dependency bumps are transitive from that.

That said, I'm very open to suggestions if there's a better way to handle this!

Breaking Changes

  • humafiber.New() and humafiber.NewWithGroup() now require github.com/gofiber/fiber/v3
  • humafiber.Unwrap() now returns fiber.Ctx (interface) instead of *fiber.Ctx (pointer)
  • Users on Fiber v2 should migrate to humafiber.NewV2() / humafiber.UnwrapV2()

Fixes #920

@robtme robtme left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is awesome man, thanks for spending the time to work on this!

I just did a super quick initial review. Please forgive me ignorance around Fiber itself. I'll happily dive in a little more when I have the time :)

Comment thread adapters/humafiber/humafiber.go Resolved
Comment thread adapters/humafiber/humafiber.go Resolved
Comment thread adapters/humafiber/humafiber.go Resolved
Comment thread adapters/humafiber/humafiber.go Resolved
Comment thread adapters/humafiber/humafiber.go Resolved
@wheinze

wheinze commented Feb 16, 2026 •

Copy link
Copy Markdown
Contributor Author

This is awesome man, thanks for spending the time to work on this!

I just did a super quick initial review. Please forgive me ignorance around Fiber itself. I'll happily dive in a little more when I have the time :)

@wolveix Thanks for your contributions to this project 👍 I'm totally happy that I got that first feedback that fast ;)

Did address your feedback. Let me know, if there's anything else that needs clarification or adjustments =)

@wheinze

wheinze commented Feb 17, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the golangci-lint issue:
image

@codecov

codecov Bot commented Feb 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.08%. Comparing base (887f7d4) to head (9b4dc2d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #962   +/-   ##
=======================================
  Coverage   93.08%   93.08%           
=======================================
  Files          23       23           
  Lines        4769     4769           
=======================================
  Hits         4439     4439           
  Misses        270      270           
  Partials       60       60           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wheinze

wheinze commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor Author

I expect https://github.com/danielgtaylor/huma/actions/runs/22092253987/job/63897228707?pr=962 failed while compiling the test files with Go 1.24, which is not supported as mentioned in the PR description.

Shall I remove it from the test matrix?

@wheinze

wheinze commented Feb 17, 2026

Copy link
Copy Markdown
Contributor Author

Shall I remove it from the test matrix?

Filed a PR onto my fork repo to verify this: wheinze#1

I totally get the idea of supporting as much Go versions as possible and would also give this high prio, but it seems, at least to me, that the frameworks (Fiber and Echo) are pushing it so we don't really have an option. Also the Go team itself only supports the latest two major versions: https://go.dev/doc/devel/release#policy

@robtme

robtme commented Feb 17, 2026

Copy link
Copy Markdown
Collaborator

@wheinze completely agreed, and that's the policy for most libraries, including Huma! I just figured I'd do a 1.24 release before 1.25 :) I'll bump deps shortly!

@wheinze

wheinze commented Feb 17, 2026

Copy link
Copy Markdown
Contributor Author

@wheinze completely agreed, and that's the policy for most libraries, including Huma! I just figured I'd do a 1.24 release before 1.25 :) I'll bump deps shortly!

Nice, thanks!

@sharath-09 sharath-09 mentioned this pull request Feb 20, 2026
@wheinze

wheinze commented Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

@wolveix I'm assuming that you currently observe regressions to latest changes to huma ensuring stable sailing and that bigger changes like this PR will be applied when treating huma and it's community to be ready.

In case my assumption is wrong, please let me know if you miss sth in this PR.

@robtme

robtme commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

@wheinze sorry this has sat for so long, I've been away from home for the past few weeks. Intending to review this soon :)

@wheinze

wheinze commented Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

@wheinze sorry this has sat for so long, I've been away from home for the past few weeks. Intending to review this soon :)

easy.. got it.. enjoy your time 👍 don't rush

@syhily

syhily commented Apr 2, 2026

Copy link
Copy Markdown

@wheinze I have tested this PR locally. It works without any issue. Can you continue review this PR and get it merged?

Copilot AI review requested due to automatic review settings April 2, 2026 14:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@robtme
robtme merged commit e2db596 into danielgtaylor:main Apr 2, 2026
@robtme

robtme commented Apr 2, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks @wheinze!

This will be included in our next non-hotfix release :)

@syhily

syhily commented Apr 2, 2026

Copy link
Copy Markdown

Thanks for @wheinze and @wolveix

@kennethj

Copy link
Copy Markdown

Is there an ETA for the next release?

@wheinze

wheinze commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

@wolveix are there any schedules for upcoming releases already?

@robtme

robtme commented May 15, 2026 •

Copy link
Copy Markdown
Collaborator

Released as part of v2.38.0. I've been swamped with work and wanted to get in a few fixes, but I also don't want Fiber v3 support sitting idle in the meantime.

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.

Support for fiber v3

5 participants