-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
fix #10054 - form data collector with dynamic fields #13027
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
Conversation
| Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#10054 | License | MIT | Doc PR | -
Just tested with the steps described here: #11474 (comment) and I confirm that this fixes the issue. |
Note to myself: this should be merged in 2.5. |
@zulus Can you add a unit test to ensure that we don't have a regression in the future? Thanks. |
@fabpot Off course. I also can close this pull request and prepare for 2.5 with tests. |
I think I have a similar issue with Symfony 2.6.1. I created a form (which works perfectly) but when I call the profiler I get: Key "type" for array with keys "id, name, view_vars, children" does not exist in @WebProfiler/Collector/form.html.twig at line 423 Will the fix also be merged in 2.6.1? The only thing I don't have the allow_add enabled :/ |
Thank you @zulus. |
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #13027). Discussion ---------- fix #10054 - form data collector with dynamic fields | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #10054 | License | MIT | Doc PR | - This simple patch will fix webprofiler bug with collection field. Commits ------- cffb64f fix #10054 - form data collector with dynamic fields
@zulus I've merged your PR in the 2.5 branch. Can you open a new PR on 2.5 to add some unit tests? Thanks. |
Awesome, thank you very much @zulus for fixing this issue! |
@zulus Can you have a look at the tests; they are actually broken because of this PR: phpunit src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php
PHPUnit 4.3.5 by Sebastian Bergmann.
Configuration read from phpunit.xml.dist
........E
Time: 146 ms, Memory: 5.00Mb
There was 1 error:
1) Symfony\Component\Form\Tests\Extension\DataCollector\FormDataCollectorTest::testCollectSubmittedDataCountsErrors
array_replace(): Argument #2 is not an array
src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php:106
src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php:143
src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php:514 |
| Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | -
@sergionegri Has your issue been fixed with the latest |
This PR was merged into the 2.5 branch. Discussion ---------- fix regression in form tests after pr #13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 1121064 fix regression in form tests after pr #13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | -
* 2.5: Updated generateSql tool Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger fix regression in form tests after pr #13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix #10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port Update the note about origins of the CssSelector component. Use the correct cssselect library name in docblocks. [DomCrawler] fixed bug #12143 Conflicts: src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php
* 2.6: (21 commits) Updated generateSql tool Fix grammar Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger fix regression in form tests after pr #13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix #10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port Update the note about origins of the CssSelector component. Use the correct cssselect library name in docblocks. Fix wrong DateTransformer timezone param for non-UTC configuration. #12808 [Form] Add further timezone tests for date type ... Conflicts: src/Symfony/Component/Locale/Locale.php src/Symfony/Component/Locale/composer.json
* 2.7: (26 commits) Updated generateSql tool Fix grammar Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger Updated the SQL data generated from the generateSql tool Updated generateSql tool fix regression in form tests after pr #13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - [FrameworkBundle] added a test router for the buil-in web server Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix #10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port [2.7] Allow 3.0 requirements ...
@xabbuh I'm new to github and the way to properly interact with the community, so please excuse me in advance if my approach is not right. I'm running v2.7.0 now and the problem persists. Should it be fixed? I see the pull requests for 2.7 also, but don't know if they are implemented already or not. |
@sergionegri There was no new release since the issue has been fixed. This mean that you would at least have to use the latest development version to check. Though I think that this won't solve your problem since your error message is the same as the one in #13155. Fortunately, there is already a proposed fix for this (see #13166) which should resolve your issue. |
Btw, basing on 2.7 is not a very good decision. It's still in early-development. You should try out 2.6. |
I'll wait for the next update then. I was on 2.6.1 but running "composer update" it upgraded to 2.7. How can I tell it to upgrade to any 2.6.X but not 2.7.X? |
Make sure to have |
Sorry, I confirm I still run 2.6.1. Running the last "composer update" I saw a "(v2.7.0)" and assumed it was Symfony, but actually it was the symfony/monolog-bundle. I also checked and the "stable" option should be the default one, so I should be ok. As soon as it gets fixed in a stable version I'll let you know if it gets fixed. |
@sergionegri If you want test latest 2.6 snapshot, replace: "symfony/symfony" : "2.6.*" with "symfony/symfony" : "2.6.*@dev" in your composer.json and run |
* 2.5: Updated generateSql tool Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger fix regression in form tests after pr symfony#13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix symfony#10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port Update the note about origins of the CssSelector component. Use the correct cssselect library name in docblocks. [DomCrawler] fixed bug symfony#12143 Conflicts: src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php
* 2.6: (21 commits) Updated generateSql tool Fix grammar Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger fix regression in form tests after pr symfony#13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix symfony#10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port Update the note about origins of the CssSelector component. Use the correct cssselect library name in docblocks. Fix wrong DateTransformer timezone param for non-UTC configuration. symfony#12808 [Form] Add further timezone tests for date type ... Conflicts: src/Symfony/Component/Locale/Locale.php src/Symfony/Component/Locale/composer.json
* 2.7: (26 commits) Updated generateSql tool Fix grammar Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger Updated the SQL data generated from the generateSql tool Updated generateSql tool fix regression in form tests after pr symfony#13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - [FrameworkBundle] added a test router for the buil-in web server Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix symfony#10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port [2.7] Allow 3.0 requirements ...
* 2.5: Updated generateSql tool Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger fix regression in form tests after pr symfony#13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix symfony#10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port Update the note about origins of the CssSelector component. Use the correct cssselect library name in docblocks. [DomCrawler] fixed bug symfony#12143 Conflicts: src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php
* 2.6: (21 commits) Updated generateSql tool Fix grammar Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger fix regression in form tests after pr symfony#13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix symfony#10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port Update the note about origins of the CssSelector component. Use the correct cssselect library name in docblocks. Fix wrong DateTransformer timezone param for non-UTC configuration. symfony#12808 [Form] Add further timezone tests for date type ... Conflicts: src/Symfony/Component/Locale/Locale.php src/Symfony/Component/Locale/composer.json
* 2.7: (26 commits) Updated generateSql tool Fix grammar Fix the implementation of deprecated Locale classes Fix phpdoc and coding standards Replace usages of the deprecated TypeTestCase by the new one Remove usages of deprecated constants Update functional tests to use the PSR NullLogger Updated the SQL data generated from the generateSql tool Updated generateSql tool fix regression in form tests after pr symfony#13027 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - [FrameworkBundle] added a test router for the buil-in web server Make fabbot happy Clean up testing No global state for isolated tests and other fixes No global state for isolated tests and other fixes fix symfony#10054 - form data collector with dynamic fields [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment [Debug] fix checkip6 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port [2.7] Allow 3.0 requirements ...
This simple patch will fix webprofiler bug with collection field.