This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Fabien Potencier 5487a1f076 merged branch ChrisTickner/formbuilder_remove_bug_fix (PR #4826)
Commits
-------

f71e2a8 [Form] FormBuilder Bug Fix: remove() was not properly removing children

Discussion
----------

[Form] FormBuilder Bug Fix: remove() was not properly removing children

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4803
License of the code: MIT

FormBuilder initially sets unresolved children as NULL, until resolved.
 If FormBuilder::remove() is called before that child is resolved, the
if statement turns false, because isset(null) is false, when it should
be true.  Instead, we should check to see if the key exists, and if so,
process and unset it.

Closes #4803

---------------------------------------------------------------------------

by bschussek at 2012-07-10T07:41:55Z

Can you please add a test covering this case?

---------------------------------------------------------------------------

by ChrisTickner at 2012-07-10T09:43:07Z

Sure, added a test case.  It fails before the patch and passes after.

---------------------------------------------------------------------------

by bschussek at 2012-07-10T09:47:06Z

Thanks. Can you please add a comment to the test with the URL of this PR? Also, please squash your commits into one when your done.

---------------------------------------------------------------------------

by ChrisTickner at 2012-07-10T10:02:16Z

Oops, I deleted the remote branch and re-pushed without realizing we'd lose some history on this PR page.  Live and learn I suppose.

---------------------------------------------------------------------------

by bschussek at 2012-07-10T10:18:20Z

Thanks!
2012-07-10 12:18:45 +02:00
src/Symfony merged branch ChrisTickner/formbuilder_remove_bug_fix (PR #4826) 2012-07-10 12:18:45 +02:00
.editorconfig Add EditorConfig File 2012-06-16 14:08:15 +02:00
.gitignore ignore composer.phar 2012-04-20 14:10:06 +01:00
.travis.yml merged 2.0 2012-05-30 13:44:37 +02:00
autoload.php.dist removed unneeded code 2012-06-30 16:47:41 +02:00
CHANGELOG-2.0.md updated CHANGELOG for 2.0.15 2012-05-30 18:59:04 +02:00
composer.json Changed the minimum stability to dev for the testsuite 2012-07-04 18:43:06 +02:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.0.15 2012-05-30 18:59:37 +02:00
LICENSE Updated LICENSE files copyright 2012-02-22 10:10:37 +01:00
phpunit.xml.dist Set init.default_locale to 'en' in phpunit.xml.dist 2012-05-11 09:33:42 +02:00
README.md updated minimum PHP version to 5.3.3 2012-05-07 10:29:11 +02:00
UPGRADE-2.1.md [Form] Deprecated Form::bindRequest() and replaced it by a PRE_BIND listener 2012-07-09 20:34:45 +02:00

README

Build Status

What is Symfony2?

Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Requirements

Symfony2 is only supported on PHP 5.3.3 and up.

Installation

The best way to install Symfony2 is to download the Symfony Standard Edition available at http://symfony.com/download.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony2 can help speed up your development and take the quality of your work to the next level, read the official Symfony2 documentation.

Contributing

Symfony2 is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section.