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

[DomCrawler] exclude fields inside "template" tags#28147

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 1 commit intosymfony:2.8fromGorjunov:dom_crawler_exclude_template
Nov 26, 2018
Merged

[DomCrawler] exclude fields inside "template" tags#28147

fabpot merged 1 commit intosymfony:2.8fromGorjunov:dom_crawler_exclude_template
Nov 26, 2018

Conversation

@Gorjunov
Copy link

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

Exclude fields values/files if fields are inside template tag. I think better to exclude values only instead of excluding fields at all (described in ticket#27285)

@jakzal
Copy link
Contributor

I think better to exclude values only instead of excluding fields at all

Could you elaborate on why it's better?

@Gorjunov
Copy link
Author

In this case it represents browser's behavior - element is accessible (e.g. by JS), but server will not get values on form submit. (if I understand right thatForm:: getValues() is same as form submit in browser)

jakzal reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

The way this is currently implemented could be understood as a new feature because it's adding a new method. If we can do without the new method, that'd be better to qualify as bugfix.

better to exclude values only instead of excluding fields at all

Shouldn't the$fields benot populated with tags inside template instead?

@stof
Copy link
Member

this should indeed be implemented when populating the list of fields, as the form in the DOM does not have this field in this case in a browser. It is not only about the submission skipping the values.

@nicolas-grekasnicolas-grekas changed the title[DomCrawler] exclude fields from Form::getValues, Form::getFiles if field is inside template tag[DomCrawler] exclude fields inside "template" tagsNov 24, 2018
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

(implementation updated to filter fields inside<template> using xpath)

@stof
Copy link
Member

Tests should also be updated to test that the Form does not contain the corresponding field at all (has returns false for this field name)

@nicolas-grekas
Copy link
Member

@stof test added

@fabpot
Copy link
Member

Thank you@Gorjunov.

@fabpotfabpot merged commit19e3e15 intosymfony:2.8Nov 26, 2018
fabpot added a commit that referenced this pull requestNov 26, 2018
This PR was merged into the 2.8 branch.Discussion----------[DomCrawler] exclude fields inside "template" tags| Q             | A| ------------- | ---| Branch?       | 2.8| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#27285| License       | MIT| Doc PR        |Exclude fields values/files if fields are inside template tag. I think better to exclude values only instead of excluding fields at all (described in ticket#27285)Commits-------19e3e15 [DomCrawler] exclude fields inside "template" tags
@GorjunovGorjunov deleted the dom_crawler_exclude_template branchNovember 26, 2018 19:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@jakzaljakzaljakzal left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.8

Development

Successfully merging this pull request may close these issues.

6 participants

@Gorjunov@jakzal@nicolas-grekas@stof@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp