This PR was merged into the 2.3 branch.
Discussion
----------
[ClassLoader] Fix class names in ApcUniversalClassLoader tests.
[ClassLoader] These tests were failing due to a leading slash in the class name. Support for the leading slash in findFile was removed a while ago, but the Apc tests were not updated. See #10576 for more details.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10576
| License | MIT
| Doc PR | N/A
Commits
-------
dc0f8f9 Fix class names in ApcUniversalClassLoader tests.
This PR was merged into the 2.3 branch.
Discussion
----------
fixed the profiler when an uncalled listener throws an exception when instantiated
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10371
| License | MIT
| Doc PR | n/a
When the profiler gets the uncalled listeners, the current page is broken without a very clear message. That happens when a listener is a service that depends for instance on the request; creating this service throws an exception.
After this patch, if we cannot get the listeners, we give up and add a log message about the problem (the error message is an info as the problem is not really related to the toolbar but more about how things work).
Commits
-------
79540d4 fixed the profiler when an uncalled listener throws an exception when instantiated
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fixed hashing of choice lists containing non-UTF-8 characters
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10409
| License | MIT
| Doc PR | -
Commits
-------
18dc9a7 Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4
73d56f7 Fixed bug in ChoiceType triggering a warning when not using utf-8
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#10536).
Discussion
----------
Avoid levenshtein comparison when using ContainerBuilder.
[DependencyInjection] ContainerBuilder catches exceptions when a service isn't found by Container::get().
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
In the process of building the exception message, I saw over 13k calls to levenshtein() when profiling a Drupal request where there's no compiled container yet, this adds around 36ms+ to the request for the function calls themselves, more for the overall logic.
Made the levenshtein calls optional based on a property on the class, then ContainerBuilder can set that to false and skip the suggestions.
![lev-before](https://f.cloud.github.com/assets/116285/2525110/d6dd3a90-b4eb-11e3-934a-a3726e0f8f09.png)
![lev-after](https://f.cloud.github.com/assets/116285/2525114/dd2de0fc-b4eb-11e3-8df0-598cadf2286b.png)
Commits
-------
cc9cc37 Avoid levenshtein comparison when using ContainerBuilder.
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] added missing unit test
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Added a unit test to ensure that #10536 won't break BC.
Commits
-------
47d1592 added missing unit test
This PR was merged into the 2.3 branch.
Discussion
----------
Fixed server values in BrowserKit
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9527, #9762, #9821, #9901
| License | MIT
| Doc PR | n/a
Commits
-------
65b9810 fixed too greedy replacements
d9cf28d fixed protocol-relative URLs
289da16 added override power to server parameters provided on request method
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] made parsing controllers more robust
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10465
| License | MIT
| Doc PR | n/a
Under some circumstances (like passing an object without an __invoke method), the Controller resolver would lead to a PHP fatal. This PR fixes that, improved error messages, and refactored the unit tests.
Commits
-------
6dba229 made parsing controllers more robust
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Fixed YamlFileLoader imports path
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10516
| License | MIT
| Doc PR | http://symfony.com/doc/current/book/service_container.html#importing-configuration-with-imports
YamlFileLoader used the resource name as the current directory during import, which can cause a failed import when using a relative path. Using the $path variable output from the locator is consistent with other loaders and fixes the bug.
Commits
-------
fd1d48b Fixed YamlFileLoader imports path
YamlFileLoader used the resource name as the current directory during import, which can cause a failed import when using a relative path. Using the $path variable output from the locator is consistent with other loaders and fixes the bug.
This PR was merged into the 2.3 branch.
Discussion
----------
[Debug] Check headers sent before sending PHP response
If the response contents has been sent before an error occurs, PHP triggers the warning "Cannot modify header information - headers already sent".
This change ensure that the useful error message is echoed, while it's impossible to change the HTTP status code and headers.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
97591c1 Check headers sent before sending PHP response
If the response contents has been sent before an error occurs, PHP
triggers the warning "Cannot modify header information - headers already sent"
This change ensure that the error message is echoed, while it's impossible
to change the HTTP status code and headers.
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Fixed ACE domain checks on UrlValidator (#10031)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10031
| License | MIT
| Doc PR |
I added some checks to allow internationalised domain names as per reported on #10031 and some extra testcases to cover ACE domain names.
Commits
-------
7a2f154 Fixed ACE domain checks on UrlValidator (#10031)
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes#10123).
Discussion
----------
handle array root element
An array to string conversion notice was thrown when the root element of the thing being validated is an array.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
Commits
-------
17ed8bf handle array root element
This PR was merged into the 2.3 branch.
Discussion
----------
Fixed regression when using Symfony on filesystems without chmod support
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8205
| License | MIT
| Doc PR | n/a
Commits
-------
cefb67aFix#8205 : Deprecate file mode update when calling dumpFile
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Fix#10437: Catch exceptions when reloading a no-cache request
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10437
| License | MIT
Commits
-------
8e3a395Fix#10437: Catch exceptions when reloading a no-cache request
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] Fix libxml_use_internal_errors and libxml_disable_entity_loader usage
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9731, #9483
| License | MIT
This should fix#9731 and #9483 that seems to be triggered when `libxml_disable_entity_loader` has been called with `true` (see https://bugs.php.net/bug.php?id=62577)
As `libxml_disable_entity_loader` is non thread safe (see https://bugs.php.net/bug.php?id=64938) and as we have some calls that might leave the setting to `true`, I think the bug should be fixed.
I've checked the use of both `libxml_use_internal_errors` and `libxml_disable_entity_loader` among symfony code.
You can see I prefered to skip DomDocument::loadXML warnings using the `@` instead of using `LIBXML_NOERROR | LIBXML_NO_WARNING` because we can log these errors whereas libxml errors would be furtives.
- [x] Check calls to DOMDocument::load
- [x] Check calls to DOMDocument::loadXML
- [x] Check calls to DOMDocument::loadHTML
- [x] Check calls to DOMDocument::loadHTMLFile
- [x] Add more tests
Commits
-------
489b8ae Fix libxml_use_internal_errors and libxml_disable_entity_loader usage
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#9784).
Discussion
----------
[HttpFoundation] Removed ini check to make Uploadedfile work on Google App Engine
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
related to #9238
Commits
-------
ecb6481 removed ini check to make uploadedfile work on gae
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10528).
Discussion
----------
Update OptionsResolver.php
Deleting an extra space in the exception.
Commits
-------
7507fbb Update OptionsResolver.php
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10525).
Discussion
----------
[HttpKernel] Clean KernelInterface docblocks
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
- Fixed questionable grammar
- Added missing periods to make it consistent
Commits
-------
4b1f050 Clean KernelInterface docblocks
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10416).
Discussion
----------
[Form] Allow options to be grouped by objects
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ae3f02f Cast the group name as a string
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10497).
Discussion
----------
[SecurityBundle] Fixed doc of InitAclCommand
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | n/a
Use {@inheritdoc}. Consistency with https://github.com/symfony/symfony/pull/9990#discussion-diff-10219606.
Commits
-------
aa49009 [SecurityBundle] Fixed doc of InitAclCommand
This PR was squashed before being merged into the 2.3 branch (closes#10410).
Discussion
----------
[Form] Fix "Array was modified outside object" in ResizeFormListener.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10405
| License | MIT
| Doc PR |
This is the second pull request for this issue. The history of this is as follows:
Original Fix was added Feb 11th under Pull Request #10232.
Users began complaining of Doctrine ArrayCollection not being updated in forms.
Revert was added Feb 15th under Pull Request #10269.
Issue #10405 was opened on 7th Mar for the original bug.
Pull Request #10269 has a failing test that illustrates users concerns.
I have added failing tests to this pull request to illustrate the problems described in #10405.
All tests now pass, and all forms of $data are now supported, including arrays, DoctrineCollection, ArrayObject, and other IteratorAggregates.
__Details as follows:__
The onSubmit() method of the ResizeFormListener class is assuming the data is an array, and calling unset directly inside a foreach. This works fine in most scenarios, but if data is an instance of IteratorAggregate that is iterating over $data by reference, it breaks with the following error:
Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener::onSubmit(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in ./vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php line 142
This is because the foreach loop is using an Iterator in the background, but the ResizeFormListener has unset the underlying data directly, causing the value that the Iterators internal pointer is pointing to to change.
The Iterator provided by IteratorAggregate may or may not have the ability to modify it's underlying data. So it is not possible to rely on the Iterator to modify the data. Instead, it is simpler to avoid modifying $data at all while we are iterating over it. So instead, we simply iterate over $data once to determine the keys we need to delete, and store them. Then we iterate over the keys and delete them from $data.
Commits
-------
aa63fae [Form] Fix "Array was modified outside object" in ResizeFormListener.
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Validator] Minor fix in IBAN validator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10481, #10489
| License | MIT
Added more values to unit tests of IBAN validator to make clear it doesn't accept lower case letters.
> Permitted IBAN characters are the digits 0 to 9 and the 26 upper-case Latin alphabetic characters A to Z.
http://en.wikipedia.org/wiki/International_Bank_Account_Number
Also made little adjustment to code which meant to validate lowercase letters but actually was useless.
Commits
-------
3eeb306 Fix IBAN validator