You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we often ignore the slugs.maxlength option when generating slugs but rather use the default 128 from Str::slug().
I see two options:
Integrate App(null, true)?->option('slugs.maxlength') into Str::slug() to use as default when set. Could this be problematic if someone limits it to a very short length, as we also often use Str::slug() for non-slugs?
Create a new, e.g. App::slug() that takes the option and passes it with all the other parameters to Str::slug(). Search through the code where we should use App::slug() instead of Str::slug(). (or Page::slug(), Router::slug() or so).
I think your point on using the method for other reasons is what counts here. So I think option 2 is better as it doesn't involve a breaking change with hard to overlook consequences.
Currently, we often ignore the
slugs.maxlength
option when generating slugs but rather use the default 128 fromStr::slug()
.I see two options:
Integrate
App(null, true)?->option('slugs.maxlength')
intoStr::slug()
to use as default when set. Could this be problematic if someone limits it to a very short length, as we also often useStr::slug()
for non-slugs?Create a new, e.g.
App::slug()
that takes the option and passes it with all the other parameters toStr::slug()
. Search through the code where we should useApp::slug()
instead ofStr::slug()
. (orPage::slug()
,Router::slug()
or so).@lukasbestle @bastianallgeier Which do you think would be better?
The text was updated successfully, but these errors were encountered: