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

[Yaml] added ability for substitute aliases when mapping is on single line#25043

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

Merged
fabpot merged 2 commits intosymfony:2.7fromxabbuh:pr-11569
Nov 23, 2017

Conversation

@xabbuh
Copy link
Member

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#11569
LicenseMIT
Doc PR

// But overwriting is allowed when a merge node is used in current block.
if ('<<' ===$key) {
$output +=$value;
}elseif ($allowOverwrite || !isset($output[$key])) {

Choose a reason for hiding this comment

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

These conditions are a bit hard to understand because above you have this:if ('<<' === $key) { $allowOverwrite = true; }. So,if('<<' === $key) andif($allowOverwrite) are interchangeable and thisif ... elseif is a bit confusing.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This part is executed several times (for each entry in the mapping). So$allowOverwrite can betrue in a subsequent iteration where$key is different from<<.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@javiereguiluz Is there still anything you would like to see changed?

@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commitdd26c80 intosymfony:2.7Nov 23, 2017
fabpot added a commit that referenced this pull requestNov 23, 2017
…s on single line (Michał Strzelecki, xabbuh)This PR was merged into the 2.7 branch.Discussion----------[Yaml] added ability for substitute aliases when mapping is on single line| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#11569| License       | MIT| Doc PR        |Commits-------dd26c80 substitute aliases in inline mappings675a3fe added ability for substitute aliases when mapping in YAML is on single line
@xabbuhxabbuh deleted the pr-11569 branchNovember 23, 2017 15:04
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

5 participants

@xabbuh@fabpot@javiereguiluz@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp