Closed ThomasLandauer closed 3 years ago
Adding a method to an interface is a Bc break. It can only be done via an @method annotation in the interface in the stable version and a deprecation and then adding it to the interface as a real method in the next major.
@ThomasLandauer The methods were left out of SlugifyInterface
to keep the interface as stable as possible and avoid BC breaks. If you implementation requires using the additional methods from the Slugify
class you should type directly against Slugify
Well, OK, then I'm closing this...
When injecting the library with typehint
Cocur\Slugify\SlugifyInterface
(as recommended in README), I'm getting this error from PhpStan when I do$this->slugify->addRule(...);
:This PR fixes it, but I guess the other methods of
Slugify
(activateRuleSet()
etc.) should be added too?