|
|
|
|
|
by stefanfisk
316 days ago
|
|
If I use Laravel’s Str in an app where both myself and a third party library want to add a chainable method, how do I make the API make sense? We can’t both subclass Str. The only option I see is Macroable and that’s a rabbit hole I’d rather avoid. |
|
I'm still not clear over what you want to do or why the third party library expects there to be a hacked in 'fluent' method on the Stringable.
Personally I'm not a fan of the Str/Stringable API:s, I find it weird and confusing to mix methods for file paths, strings, encryption and so on. Actually, I'm more of a Symfony person for reasons like this.