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] Fix wrong line number when comments are inserted in the middle of a block.#17733

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

@paradajozsef
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#15437
LicenseMIT
Doc PR-

@xabbuh what is your opinion a solution like this? (counting the skipped comment lines and when exception occurs add them to the current line count.)

@xabbuh
Copy link
Member

@paradajozsef I think the fix is a bit more complex. For example, I do not think that this will solve the issue for the following example too:

foo:    -        # foobar        baz: 123bar:    -        # bar        bar: "123",

Can you add it as a test case too?

@paradajozsef
Copy link
ContributorAuthor

@xabbuh Sorry for late answer. I added the test case and as always you are right again. 😃 In this case the line number is 9, but it should be 8. 😕 Still needs work.

@paradajozsef
Copy link
ContributorAuthor

@xabbuh I changed the fix.getNextEmbedBlock will only skip comment lines, if comments are not in a collection. WDUT?

The above test case passes, failing VarDumper tests unrelated imo.

@paradajozsef
Copy link
ContributorAuthor

Status: Needs Review

*
* @return bool
*/
privatefunctionisPreviousNonCommentLineIsCollectionItem()
Copy link
Member

Choose a reason for hiding this comment

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

method name is weird. It containsis twice

@fabpot
Copy link
Member

ping@xabbuh

@paradajozsef
Copy link
ContributorAuthor

I apologize to everyone for late answer. (I've been lack of internet at home lately because of moving to another place.)

@stof Thanks for the review. I changed the comment and method name. What aboutcheckIfPreviousNonCommentLineIsCollectionItem? It's still kind of wierd imo. Any other ide is very welcome! Thanks!

@xabbuh
Copy link
Member

@paradajozsef Can you please rebase and push again? Looks like Travis otherwise will not run builds for your changes otherwise.

@paradajozsef
Copy link
ContributorAuthor

Sure, I can do it tonight.

@stof
Copy link
Member

stof commentedMay 6, 2016

@xabbuh the reason why Travis does not run tests is because the branch conflicts. As Travis is actually running PR tests on a merge commit rather than on the feature branch, it cannot run them in case of conflicts

@paradajozsefparadajozsefforce-pushed the15437-fix-yaml-parse-exception-line-number branch fromadb111d tobf4501aCompareMay 6, 2016 22:23
@paradajozsef
Copy link
ContributorAuthor

Rebase is done, tests are green.

{
$isCollectionItem =false;
$moves =0;
while($this->moveToPreviousLine()) {
Copy link
Member

@xabbuhxabbuhMay 10, 2016
edited
Loading

Choose a reason for hiding this comment

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

please add a space before the opening parenthesis (right after thewhile keyword)

@xabbuh
Copy link
Member

👍

Status: Reviewed

ping @symfony/deciders

@paradajozsef
Copy link
ContributorAuthor

@xabbuh Thx for the review, I fixed them.

@fabpot
Copy link
Member

Thank you@paradajozsef.

fabpot added a commit that referenced this pull requestJun 8, 2016
… the middle of a block. (paradajozsef)This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#17733).Discussion----------[Yaml] Fix wrong line number when comments are inserted in the middle of a block.| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#15437| License       | MIT| Doc PR        | -@xabbuh what is your opinion a solution like this? (counting the skipped comment lines and when exception occurs add them to the current line count.)Commits-------d83e346 [Yaml] Fix wrong line number when comments are inserted in the middle of a block.
@fabpotfabpot closed thisJun 8, 2016
@paradajozsefparadajozsef deleted the 15437-fix-yaml-parse-exception-line-number branchJune 10, 2016 09:40
fabpot added a commit that referenced this pull requestJun 12, 2016
This PR was merged into the 2.7 branch.Discussion----------[Yaml] properly count skipped comment lines| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#15437,#17733,#19023| License       | MIT| Doc PR        |Commits-------da7fc36 [Yaml] properly count skipped comment lines
@fabpotfabpot mentioned this pull requestJun 15, 2016
This was referencedJun 30, 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.

6 participants

@paradajozsef@xabbuh@fabpot@stof@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp