What changed in mockery from 2 to 3

9 releases numbered after v2.53.8 up to and including v3.9.0, stable releases only. v2.53.8 and v3.9.0 are the newest stable releases of 2 and 3 we track; this page follows them as new ones ship.

30 changes across 9 releases

Added 7

v3.9.0

  • Document migration from v2 directory-based commands
  • Add memprofile option
  • Add resolve-internal-aliases option to render public aliases of internal types

v3.8.0

  • Add cpuprofile option
  • Support embedded types in matryer mocks

v3.7.0

  • Add goimports configuration options

v3.6.4

  • Support for Go 1.26 in mockery v3
Changed 9

v3.9.0

  • Let generate: false exclude an interface even when all: true is set
  • Allow replace-type to cascade from parent configs

v3.7.3

  • Updated dependencies used for licensing

v3.7.2

  • FAQ now highlights that package path errors can be caused by a case mismatch

v3.7.1

  • Updated documentation of the InterfaceFile template data
  • Replaced the old 'interface{}' syntax with 'any' in generated code

v3.7.0

  • Update example
  • Refactor name suggestion logic in method_scope.go

v3.6.4

  • Basic documentation updates
Fixed 14

v3.9.0

  • Report PackagePath and MockName template variables during migration
  • Carry v2 profile option over to cpuprofile during migration

v3.8.1

  • Honor interface-level skip-ensure imports in the matryer generator
  • Bump golang.org/x/tools to v0.51.0 to support Go 1.27.2 export data

v3.8.0

  • Clarify how to upgrade mockery with Go releases in the documentation
  • Report unparsable exclude-subpkg-regex instead of panicking
  • Mark testify mock constructors and cleanup as helpers

v3.7.4

  • Bumped golang.org/x/tools to v0.49.0 to add Go 1.27 support
  • Upgraded CI configuration for Go 1.27

v3.7.3

  • Avoided in-package import collisions with package-scope declarations in v3

v3.7.2

  • Corrected typos in comments and documentation
  • Matching now treats interface{} the same as any

v3.7.1

  • Fixed a file descriptor leak caused by a defer statement inside a loop in cmd
  • Fixed an error with InterfaceDirRelative when using external paths

Original release notes, newest first

The list above is our reading of these notes; the originals from Vektra are here, one fold per release.

v3.9.0
What's Changed
New Contributors

Full Changelog: https://github.com/vektra/mockery/compare/v3.8.1...v3.9.0

View originalPermalink

v3.8.1
What's Changed
New Contributors

Full Changelog: https://github.com/vektra/mockery/compare/v3.8.0...v3.8.1

View originalPermalink

v3.8.0
What's Changed
New Contributors

Full Changelog: https://github.com/vektra/mockery/compare/v3.7.4...v3.8.0

View originalPermalink

v3.7.4
What's Changed
New Contributors

Full Changelog: https://github.com/vektra/mockery/compare/v3.7.3...v3.7.4

View originalPermalink

v3.7.3
What's Changed
New Contributors

Full Changelog: https://github.com/vektra/mockery/compare/v3.7.2...v3.7.3

View originalPermalink

v3.7.2
What's Changed
New Contributors

Full Changelog: https://github.com/vektra/mockery/compare/v3.7.1...v3.7.2

View originalPermalink

v3.7.1
What's Changed
New Contributors

Full Changelog: https://github.com/vektra/mockery/compare/v3.7.0...v3.7.1

View originalPermalink

v3.7.0
What's Changed
New Contributors

Full Changelog: https://github.com/vektra/mockery/compare/v3.6.4...v3.7.0

View originalPermalink

v3.6.4
What's Changed

Full Changelog: https://github.com/vektra/mockery/compare/v3.6.3...v3.6.4

View originalPermalink