8000 StringUtil::singularify converts screenshot to scroonshot · Issue #18748 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

StringUtil::singularify converts screenshot to scroonshot #18748

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

Closed
TakTaki opened this issue May 11, 2016 · 1 comment
Closed

StringUtil::singularify converts screenshot to scroonshot #18748

TakTaki opened this issue May 11, 2016 · 1 comment

Comments

@TakTaki
Copy link
TakTaki commented May 11, 2016

Hello,

I've encountered an interesting error while creating my form.
I have a collection of 'screenshot' in it, and when I submit a valid form, I have an alert saying that there's no function addScroonshot declared.

I've done a little research and I think the problem might come from StringUtil::singularify function which contains at the end:

// Convert teeth to tooth, feet to foot
if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3 && 'feedback' !== $plural) {
    return substr_replace($plural, 'oo', $pos, 2);
}

Maybe I'm just wrong, and I'll appreciate your help!

Thanks!

@peterrehm
Copy link
Contributor

I just added a solution to convert screenshots. Please note that this will only work if you have a collection of screenshots

fabpot added a commit that referenced this issue Jun 8, 2016
This PR was submitted for the 2.3 branch but it was merged into the 2.7 branch instead (closes #18911).

Discussion
----------

Fixed singular of committee

| Q             | A
| ------------- | ---
| Branch?       | 2.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18872, #18748
| License       | MIT
| Doc PR        | -

In addition to PR #18909.

Commits
-------

5661d52 Fixed singular of committee
@fabpot fabpot closed this as completed Jun 8, 2016
fabpot added a commit that referenced this issue Jun 8, 2016
This PR was squashed before being merged into the 3.1 branch (closes #18909).

Discussion
----------

Fixed singular of committee

| Q             | A
| ------------- | ---
| Branch?       | 3.1?
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18872, #18748
| License       | MIT
| Doc PR        | -

As in SF 3.1 the StringUtil has been moved to a new Component, I am proposing this for 3.1.
I can easily provide the same in an additional PR against the 2.3? branch.

Commits
-------

b5e1f24 Fixed singular of committee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0