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

#20921 [Config] Provide shorthand methods for ArrayNodeDefinition::pr…#20923

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

Conversation

@skafandri
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#20921
LicenseMIT

return$this->prototype =$this->getNodeBuilder()->node(null,$type)->setParent($this);
}

/**
Copy link
Member

Choose a reason for hiding this comment

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

could be removed, IMO it doesn't add any additional value

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I think so, I think that the method name is self explanatory. But wouldn't break the code standards check?

Copy link
Member

Choose a reason for hiding this comment

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

Quite the contrary :) We are trying to only add phpdoc when it adds value.

* Shorthand for prototype('scalar').
*
* @return ScalarNodeDefinition
*/
Copy link
Member

Choose a reason for hiding this comment

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

What about usingscalarPrototype instead (same for the other new methods)?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

scalarPrototype sounds better for me. The only motivation behind the current naming is togroup the methods in an IDE auto complete list.

Copy link
Member

Choose a reason for hiding this comment

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

I understand that. But at least PhpStorm is even with the other names able to suggest all of these methods when typingprototype (if I am not completely mistaken).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes you're right. That's not a big issue. Most IDE autocomplete are clever enough to show methods containing rather than starting with a string.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I agree, my IDE does that too, I was only thinking about some friends who are still using IDEs with left prefix only autocomplete support (Netbeans 6). If you think we shouldn't care about this legacy, I am into it.

@skafandri
Copy link
ContributorAuthor

I don't understand the generated diff of fabbot.io Is that hook open source? :)

@fabpot
Copy link
Member

👍

1 similar comment
@xabbuh
Copy link
Member

👍

$this->assertFalse($this->getField($node,'normalizeKeys'));
}

publicfunctiontestPrototypeVariable()
Copy link
Contributor

Choose a reason for hiding this comment

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

What about a single test?

@skafandri
Copy link
ContributorAuthor

A single test with multiple asserts to cover all the cases. I am fine with that. What do you think guys?

@fabpot
Copy link
Member

Thank you@skafandri.

@fabpotfabpot closed thisDec 19, 2016
fabpot added a commit that referenced this pull requestDec 19, 2016
…eDefinition::pr… (skafandri)This PR was squashed before being merged into the 3.3-dev branch (closes#20923).Discussion----------#20921 [Config] Provide shorthand methods for ArrayNodeDefinition::pr…| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#20921| License       | MITCommits-------22b8490#20921 [Config] Provide shorthand methods for ArrayNodeDefinition::pr…
@oleg-andreyev
Copy link
Contributor

👍

nicolas-grekas added a commit that referenced this pull requestDec 28, 2016
This PR was merged into the 2.7 branch.Discussion----------[Config] Improve PHPdoc / IDE autocomplete| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes-ish| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->The missing pieces for fixing the autocomplete in IDE's (tested in `PhpStorm 2016.3.2`).Each method seems to be found now for the framework bundle configuration 😱Actually uses#20923 where needed, but i think we should go with it consistently.Relates to#20290 (comment)Commits-------3f3c6e0 [Config] Improve PHPdoc / IDE autocomplete
@fabpotfabpot mentioned this pull requestMay 1, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@xabbuhxabbuhxabbuh left review comments

+2 more reviewers

@ro0NLro0NLro0NL left review comments

@ogizanagiogizanagiogizanagi left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@skafandri@fabpot@xabbuh@oleg-andreyev@ro0NL@ogizanagi@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp