maker-bundle icon indicating copy to clipboard operation
maker-bundle copied to clipboard

Changed behaviour of Str::addSuffix so it doesn't care about duplicate suffixes

Open jzawadzki opened this issue 3 years ago • 1 comments

This PR tries to resolve the issue: https://github.com/symfony/maker-bundle/issues/964

I'm still not sure why Str::addSuffix wanted to be sure that suffix is not added twice. So, let someone with bigger knowledge of the bundle and class name generation review the PR :)

Thanks!

jzawadzki avatar Sep 03 '21 21:09 jzawadzki

We should maybe have "addPrefix()" and "ensurePrefix()", where add adds it no matter the string looks before and ensure ensures it is only added once?

EnsureEnd() is the method used in Symfony string component

OskarStark avatar Sep 04 '21 08:09 OskarStark