Skip to content
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

[Form] deprecate using invalid names for buttons #28969

Merged
merged 1 commit into from Feb 21, 2019

Conversation

Projects
None yet
7 participants
@xabbuh
Copy link
Member

commented Oct 24, 2018

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #28964
License MIT
Doc PR

@xabbuh xabbuh added this to the next milestone Oct 24, 2018

@xabbuh xabbuh force-pushed the xabbuh:issue-28964 branch 3 times, most recently from 21c1170 to b9cd039 Oct 24, 2018

@xabbuh xabbuh force-pushed the xabbuh:issue-28964 branch from b9cd039 to a8b3599 Oct 25, 2018

@@ -63,6 +63,18 @@ public function __construct(?string $name, array $options = array())
$this->name = $name;
$this->options = $options;
if (\preg_match('/^([^a-z0-9_].*)?(.*[^a-zA-Z0-9_\-:].*)?$/D', $name, $matches)) {

This comment has been minimized.

Copy link
@javiereguiluz

javiereguiluz Nov 7, 2018

Member

Just asking: is this validating the value of the name HTML attribute of <button> elements ... or is this a Symfony thing? I say this because HTML allows for example : as the first character of name.

This comment has been minimized.

Copy link
@xabbuh

xabbuh Nov 7, 2018

Author Member

It affects both. The internal name is used to generate the HTML attribute value. Buttons will then behave the same as "normal" form types already behave.

@xabbuh xabbuh force-pushed the xabbuh:issue-28964 branch from a8b3599 to 9fe11c6 Nov 16, 2018

@xabbuh xabbuh force-pushed the xabbuh:issue-28964 branch 2 times, most recently from 8c3fbf4 to b0af2bb Jan 2, 2019

@xabbuh xabbuh force-pushed the xabbuh:issue-28964 branch from b0af2bb to 0328857 Jan 16, 2019

@xabbuh xabbuh force-pushed the xabbuh:issue-28964 branch from 0328857 to 405aa54 Feb 4, 2019

@xabbuh

This comment has been minimized.

Copy link
Member Author

commented Feb 21, 2019

@fabpot

fabpot approved these changes Feb 21, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

Thank you @xabbuh.

@fabpot fabpot merged commit 405aa54 into symfony:master Feb 21, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Feb 21, 2019

feature #28969 [Form] deprecate using invalid names for buttons (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] deprecate using invalid names for buttons

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #28964
| License       | MIT
| Doc PR        |

Commits
-------

405aa54 deprecate using invalid names for buttons

@xabbuh xabbuh deleted the xabbuh:issue-28964 branch Feb 21, 2019

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019

@fabpot fabpot referenced this pull request May 9, 2019

Merged

Release v4.3.0-BETA1 #31435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.