Skip to content

[DomCrawler] No more exception on field name with strange format #18570

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
wants to merge 1 commit into from

Conversation

guiled
Copy link
Contributor

@guiled guiled commented Apr 16, 2016

Q A
Branch? "master" for new features / 2.3, 2.7, 2.8 or 3.0 for fixes
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes/no
Fixed tickets #18569
License MIT
Doc PR reference to the documentation PR, if any

@guiled guiled changed the title Fix proposal for #18569 No more exception on field name with strange format Apr 16, 2016
@guiled guiled changed the title No more exception on field name with strange format [DomCrawler] No more exception on field name with strange format Apr 16, 2016
@guiled
Copy link
Contributor Author

guiled commented Apr 16, 2016

Tests are failing, but if this PR can be accepted I will need some help to manage all the tests about malformed name...
Thank you.

}
}

return $segments;
}

throw new \InvalidArgumentException(sprintf('Malformed field path "%s"', $name));
return [$name];
Copy link
Member

Choose a reason for hiding this comment

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

should be array($name)

@stof
Copy link
Member

stof commented May 13, 2016

this cannot be accepted without tests covering these cases to prevent regressions

@guiled
Copy link
Contributor Author

guiled commented May 16, 2016

I think that the things I will do is to remove the tests that check if the DomCrawler raise error when the name is malformed.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Jun 8, 2016

@guiled remove these tests & move the used-to-be invalid names to a test ensuring they now are accepted :)

@fabpot
Copy link
Member

fabpot commented Jun 14, 2016

@guiled do you have time to finish this PR?

@fabpot
Copy link
Member

fabpot commented Jun 22, 2016

I'm taking over to finish this one. See #19138

@fabpot fabpot closed this Jun 22, 2016
fabpot added a commit that referenced this pull request Jun 22, 2016
…format (guiled, fabpot)

This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] No more exception on field name with strange format

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18569, #18570
| License       | MIT
| Doc PR        | n/a

Commits
-------

e204913 finished previous commit
953a383 No more exception for malformed input name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants