Closed Gilthoniel closed 9 months ago
Opened https://github.com/DATA-DOG/go-sqlmock/pull/329 to make this stricter args checking an opt-in.
This change should have only been done in a new major version. Definitely not a patch version.
Besides doing this, it might be nice to offer .WithAnyArgs()
for cases where no matching is desired but the default is, otherwise, to expect arg-matching to be declared.
@filikos is this going to be corrected/reverted in some way, or does the community need to create a fork in which patch versions don't incorporate backwards-incompatible changes?
Breaking change fix was merged https://github.com/DATA-DOG/go-sqlmock/pull/329 Thanks for the efforts @IvoGoman The breaking change was not intentional and fatigued by the amount of changes that we're pending to be released. https://github.com/DATA-DOG/go-sqlmock/releases/tag/v1.5.1 Will keep this in mind for upcoming releases.
Release: https://github.com/DATA-DOG/go-sqlmock/releases/tag/v1.5.2
The latest release changes the way arguments are matched which is causing a breaking behavior compared to previous versions.
See https://github.com/DATA-DOG/go-sqlmock/pull/295.
Operating system and Go Version
Ubuntu 22.04 and Go v1.21.1
Issue
Arguments must now always be provided otherwise it does not match anymore.
Reproduction steps
Expected Result
Instead of introducing a breaking change, the behavior should be enabled explicitly by the developer. Here an error is returned.
Actual Result
It should not return an error.