Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

jzawadzki
Copy link

This PR tries to resolve the issue: #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!

@OskarStark
Copy link
Contributor

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

Copy link
Collaborator

@jrushlow jrushlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jzawadzki!

@jrushlow jrushlow added the Status: Reviewed Has been reviewed by a maintainer label Feb 23, 2022
@jrushlow jrushlow added the Bug Bug Fix label Mar 3, 2022
@jrushlow jrushlow added this to the v1.61.0 milestone Jun 18, 2024
@jrushlow jrushlow modified the milestones: v1.61.0, v1.62.0 Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants