Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed singular of committee#18909

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
peterrehm wants to merge4 commits intosymfony:3.1frompeterrehm:inflector-committee
Closed

Fixed singular of committee#18909

peterrehm wants to merge4 commits intosymfony:3.1frompeterrehm:inflector-committee

Conversation

@peterrehm
Copy link
Contributor

@peterrehmpeterrehm commentedMay 29, 2016
edited
Loading

QA
Branch?3.1?
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#18872,#18748
LicenseMIT
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.

Simperfit and OskarStark reacted with thumbs up emoji
@peterrehm
Copy link
ContributorAuthor

Fabbot should be ignored in this case...

@fabpot
Copy link
Member

Can you indeed also provide a PR for 2.3?

@peterrehm
Copy link
ContributorAuthor

Just provided#18911


// Convert teeth to tooth, feet to foot
if (false !== ($pos =strpos($plural,'ee')) &&strlen($plural) >3 &&'feedback' !==$plural) {
if (false !== ($pos =strpos($plural,'ee')) &&strlen($plural) >3 &&!in_array(strtolower($plural),$irregularNouns)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, preserve the strict comparison atin_array().

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Updated.

}
}

$irregularNouns =array(
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem to be in use?

@peterrehm
Copy link
ContributorAuthor

@teohhanhui I was thinking about the whitelist approach as well but I see the problem that with the whitelist approach it will be hard to match all the relevent cases and the risk is high to introduce BC breaks whereas the blacklist approach should not break existing applications.

@TakTaki
Copy link

@peterrehm I don't totally agree with you as I currently have ascreenshotattribute in some entities, and this patch will break my applications. But I rather have it break than have aaddScroonshot in my app.

@TakTaki
Copy link

I was wondering: what if I have an attribute namedscreen? Does that mean we'll have to make a new patch to addscreen to the blacklist?

@peterrehm
Copy link
ContributorAuthor

@TakTaki It would have needed an explicit list. After some research I only found the 3 added nouns affected, I did not find more. So I switched to the whitelist approach which should be easier. The question is if this is a BC break or not? /cc@nicolas-grekas

* Irregular nouns which will not be converted 'ee' to 'oo'
*
* @var array
*/
Copy link
Member

Choose a reason for hiding this comment

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

this looks unused

@stof
Copy link
Member

stof commentedJun 6, 2016

Can you synchonize the PR targetting the older branch too ?

@peterrehm
Copy link
ContributorAuthor

@stof It was, missed some changes it is already updated.

@peterrehm
Copy link
ContributorAuthor

@stof The other PR is already updated as well. What do you think about the changed? I could not think of any better solution.

* @var array
*
* @see http://english-zone.com/spelling/plurals.html
* @see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English
Copy link
Contributor

Choose a reason for hiding this comment

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

fabpot added a commit that referenced this pull requestJun 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
Copy link
Member

Thank you@peterrehm.

fabpot added a commit that referenced this pull requestJun 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
@fabpotfabpot closed thisJun 8, 2016
@peterrehmpeterrehm deleted the inflector-committee branchJune 8, 2016 15:18
@fabpotfabpot mentioned this pull requestJun 15, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@peterrehm@fabpot@TakTaki@stof@teohhanhui@phansys@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp