This PR was squashed before being merged into the 2.2 branch (closes#9026).
Discussion
----------
[FrameworkBundle][Security] Replaced void return type with null for consistency
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
We're using `null` everywhere else.
Commits
-------
e4100ac [FrameworkBundle][Security] Replaced void return type with null for consistency
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes#8969).
Discussion
----------
[HttpFoundation] NativeSessionStorage regenerate
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8460
| License | MIT
| Doc PR |
Since session_start is called by the regenerate function, then the 'started' flag of NativeSessionStorage have to be set to true. Otherwise, the variable $_SESSION is initiated and the exception "Failed to start the session: already started by PHP ($_SESSION is set)." is thrown.
This can be reproduced by clearing the session data (cookies) before authenticating with a method that does not require csrf (eg. using the confirmation link of FOSUserBundle).
Commits
-------
7a0eeb3 [HttpFoundation] NativeSessionStorage regenerate
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes#9015).
Discussion
----------
Fix#6029 : Use setTimeZone if this method exists.
The php version is not a critical factor to choose the method, but we have to use setTimeZone, if it exists.
Commits
-------
7d84cd7 Use setTimeZone if this method exists.
This PR was merged into the 2.2 branch.
Discussion
----------
[Console] Fixed argument parsing when a single dash is passed.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8986
| License | MIT
| Doc PR |
Commits
-------
42019f6 [Console] Fixed argument parsing when a single dash is passed.
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes#9016).
Discussion
----------
[Config] Fix FileResource test
I had the following test failing on OS X before:
```
There was 1 failure:
1) Symfony\Component\Config\Tests\Resource\FileResourceTest::testSerializeUnserialize
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-/var/folders/ph/1jns4kxj653gqg7try5m2k780000gn/T/tmp.xml
+/private/var/folders/ph/1jns4kxj653gqg7try5m2k780000gn/T/tmp.xml
symfony/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php:56
```
Commits
-------
76a5b50 [Config] Fix FileResource test
I had the following test failing on OS X before:
There was 1 failure:
1) Symfony\Component\Config\Tests\Resource\FileResourceTest::testSerializeUnserialize
Failed asserting that two strings are identical.
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] Fixed the way path to directory is trimmed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | re #8388
| License | MIT
| Doc PR | -
Commits
-------
773e716 [HttpFoundation] Fixed the way path to directory is trimmed.
* 2.2:
[HttpFoundation] removed double-slashes (closes#8388)
[HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
[TwigBridge] fixed form rendering when used in a template with dynamic inheritance
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8507
| License | MIT
| Doc PR | n/a
Commits
-------
4f5b8f0 [HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
This PR was merged into the 2.2 branch.
Discussion
----------
[TwigBridge] fixed form rendering when used in a template with dynamic inheritance
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5284
| License | MIT
| Doc PR | n/a
Commits
-------
4c1dbc7 [TwigBridge] fixed form rendering when used in a template with dynamic inheritance
* 2.2:
[HttpKernel] added a check for private event listeners/subscribers
[FrameworkBundle] fixed registration of the register listener pass
[Form] Fixed regression causing invalid "WHERE id IN ()" statements
[DependencyInjection] fixed a non-detected circular reference in PhpDumper (closes#8425)
[Form] Fixed regression in BooleanToStringTransformer from ed83752
[FrameworkBundle] removed obsolete code
[Process] Close unix pipes before calling `proc_close` to avoid a deadlock
Conflicts:
src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
src/Symfony/Component/Process/Process.php
This PR was merged into the 2.2 branch.
Discussion
----------
Fixed registration of private event listeners/subscribers
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6541
| License | MIT
| Doc PR | n/a
When registering a private event subscriber/listener, the listener was just ignored.
This PR does two things to fix the problem:
* the event listener pass is done earlier to get access to the private services
* when a private service is identified, a proper exception is thrown
Commits
-------
8444339 [HttpKernel] added a check for private event listeners/subscribers
427ee19 [FrameworkBundle] fixed registration of the register listener pass
This circular reference cannot be detected by the compiler pass as we
don't check for method arguments there.
The Container itself already detects such circular references at runtime.
So this fix is about circular references that are not detected at
compile time, and are not even detected at runtime because the code that
would cause the detection is never run (generated after a return
statement.)
This PR was merged into the 2.2 branch.
Discussion
----------
[Process][2.2] Close unix pipes before calling `proc_close` to avoid a deadlock
| Q | A
| ------------- | ---
| Bug fix? | potentially
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
see http://php.net/manual/en/function.proc-close.php
Commits
-------
37102dc [Process] Close unix pipes before calling `proc_close` to avoid a deadlock
This PR was merged into the 2.3 branch.
Discussion
----------
[Process][2.3] Fix process merge in 2.3
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Handles should be read and closed after `proc_close` is called. (this follows merge of #8983)
Commits
-------
19fef77 [Process] Fix process merge in 2.3
This PR was merged into the 2.3 branch.
Discussion
----------
[Intl] made RegionBundle merge fallback data if using a country-specific locale
See #8442 and symfony/Icu#2.
Essentially, country data fetches from the Intl component do not currently work when using a locale with a country specifier, e.g. `fr_FR`. This change forces a merge on the data against the root language locale, thus making country data available for such locales.
Commits
-------
52d8676 [Intl] made RegionBundle and LanguageBundle merge fallback data when using a country-specific locale
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fixed FormValidator::findClickedButton() not to be called exponentially
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8317
| License | MIT
| Doc PR | -
Commits
-------
b65a515 [Form] Fixed FormValidator::findClickedButton() not to be called exponentially
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] fixed format duplication in Request
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8976
| License | MIT
| Doc PR | n/a
Commits
-------
8c2a733 [HttpFoundation] fixed format duplication in Request
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
Same as #7940, rebased onto 2.3.
Commits
-------
7879f07 [DoctrineBridge] Improved test coverage of EntityChoiceList
58e7c10 [Form] Improved test coverage of ChoiceList classes
9542d72 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
72b8807 [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
e1bf07f [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
* 2.2:
Fixed docblock in UserInterface::getSalt()
[Process] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
[DoctrineBridge] Improved test coverage of EntityChoiceList
[Form] Improved test coverage of ChoiceList classes
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
[Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
[Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
[HttpKernel] made code more reliable
Conflicts:
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php
src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php
src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
src/Symfony/Component/Form/Form.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
src/Symfony/Component/Process/Process.php
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
Same as #7940, rebased onto 2.2.
Commits
-------
4d2dc55 [DoctrineBridge] Improved test coverage of EntityChoiceList
9d3628c [Form] Improved test coverage of ChoiceList classes
ed83752 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
30aa1de [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
53f292a [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
This PR was merged into the 2.2 branch.
Discussion
----------
[Process][2.2] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8970
| License | MIT
This fix the read of file handles after `proc_close` as described in the issue. I enable some stdin=>stdout pipes tests on windows with some dedicated buffer size. Solving the issue, I finally reproduced this [PHP bug](https://bugs.php.net/bug.php?id=65650) that I first described in my PR note in #8924
Most of Windows usage should be okay, but in case of a program throws lots of output and fills the buffer, some data might be lost/corrupted. Should it be documented ? This is a Windows only known issue.
Commits
-------
1e75cf9 [Process] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes#8982).
Discussion
----------
Fixed docblock in UserInterface::getSalt()
This method can return null, too.
See the line above:
> "This can return null if the password was not encoded using a salt."
Commits
-------
3c7b557 Fixed docblock in UserInterface::getSalt()