zHaytam / SmartBreadcrumbs

A utility library for ASP.NET Core (both MVC and Razor Pages) websites to easily add and customize breadcrumbs.
https://blog.zhaytam.com/2018/06/24/asp-net-core-using-smartbreadcrumbs/
MIT License
161 stars 77 forks source link

Some renaming fixes #10

Closed ghost closed 5 years ago

ghost commented 5 years ago

⚠️ Breaking change!

This PR aligns the class and method names to common guidelines. For example, the extension method is called UseBreadcrumbs at the moment, which is normally used in the Startup.Configure() method. However, this method requires the IServiceCollection, which is usually done in the Startup.ConfigureServices() method. However, in the latter, the method naming services.Add.. is common.

zHaytam commented 5 years ago

Hello,

First of all thank you for the PRs, I merged your first two. For this one, since it's changing the namings, it can break people's code and I don't know if I should release it as a pre-release or something, what do you think?

ghost commented 5 years ago

Hi, there are two ways of how this could be handled.

  1. Step up to the next major version (1.1) and mention the breaking change in the changelog.
  2. Step up to the next major version and inherit from the old class, like:

    public class BreadcrumbsManager : BreadcrumbManager {}

and by using an overload for the UseBreadcrumbs() method, both marked as [Obsolete]. This allows the easier removal in one of the next versions.

ghost commented 5 years ago

Nevertheless, do you mind updating the NuGet package?

zHaytam commented 5 years ago

Done, it's validating for now.

zHaytam commented 5 years ago

SmartBreadcrumbs 2.0.0 comes with these changes.