devise_masquerade icon indicating copy to clipboard operation
devise_masquerade copied to clipboard

Breaking changes in newer version/s

Open adriancb opened this issue 3 years ago • 2 comments

As a follow-up to https://github.com/oivoodoo/devise_masquerade/issues/92 there are several recent PATCH releases that may have changed the 'public' interface and therefore do not adhere to the correct SEMVER - https://semver.org/.

An example is extending the controller and adding to the resource session https://github.com/oivoodoo/devise_masquerade/blob/v1.3.3/app/controllers/devise/masquerades_controller.rb#L17.

adriancb avatar Aug 17 '21 03:08 adriancb

Hi @adriancb

Thank you for reporting the issue but could you clarify the required changes that I need to apply?

oivoodoo avatar Nov 05 '22 13:11 oivoodoo

Hey @oivoodoo,

I believe the thought behind this was the renaming of find_resource to find_masqueradable_resource. As protected methods, it's reasonable to expect that inheriting classes can overload them (i.e. provide their own implementation).

IMO, the changes from 1.3.3 to 1.3.4 should've triggered a major release as they're not backwards compatible.

A change from protected > private (even though this is Ruby) at least marks them as 'private', which shifts the responsibility to those overloading those methods to understand the future impact.

The reason I'm bringing this up is that we upgrade our libs daily, and we spend much of our focus on reviewing major/minor version changes with less focus on patch changes, as we take them for granted. In this instance, we were unaffected, but that could've been different.

Let me know if that doesn't make sense or what your thoughts are.

adriancb avatar Nov 06 '22 21:11 adriancb