This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] Do not return an empty session id if the session was closed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7936
| License | MIT
| Doc PR | ~
A regression from the bug fix#9246 was introduced due to an incomplete fix ;
As the `started` flag on the NativeSessionStorage was not `true` anymore when saving the session, the session id was always empty when saving it, and thus when sending the `PHPSESSID` cookie.
The previous PR I made (#9530) was another approach to solve this regression, but this one should keep the fix made by @tecbot on #9246, and finish it with another verification. I may miss another place where `started` is used, but I don't really see which other conditions depending on this property should be altered...
**Note : this is #9611 rebased on 2.2**
This should be mergeable.
Commits
-------
5b9a727 When getting the session's id, check if the session is not closed
This PR was submitted for the master branch but it was merged into the 2.4 branch instead (closes#9621).
Discussion
----------
[ExpressionLanguage] fixed lexing expression ending with spaces
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9606, #9615
| License | MIT
| Doc PR |
Alternative fix for #9615
Commits
-------
d8f61c4 [ExpressionLanguage] fixed lexing expression ending with spaces
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#9636).
Discussion
----------
[Translation] Fixes#9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9633
| License | MIT
| Doc PR |
Commits
-------
2669486 [Translation] Fixes#9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Replaced inexistent interface
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #9631
| License | MIT
| Doc PR | -
`ClassMetadataFactoryInterface` was removed in 2.3 (#6096) and replaced with `MetadataFactoryInterface`.
Commits
-------
8fd3256 [Validator] Replaced inexistent interface.
This PR was merged into the 2.4 branch.
Discussion
----------
[2.4][HttpKernel] Fix profiler event-listener usage outside request stack context
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
The bug has been reported at https://github.com/silexphp/Silex-WebProfiler/issues/27
todo :
- [x] add unit test
Commits
-------
55a76e7 [HttpKernel] Fix profiler event-listener usage outside request stack context
This introduced a regression from #9246, with an incomplete fix ;
As the `started` flag on the NativeSessionStorage was not `true`
anymore when saving the session, the session id was always empty
when saving it, and thus when sending the `PHPSESSID` cookie
This PR was submitted for the master branch but it was merged into the 2.4 branch instead (closes#9624).
Discussion
----------
[Console] Fix undefined offset when formatting namespace suggestions
[`preg_grep`](http://www.php.net/manual/en/function.preg-grep.php) returns an array indexed using the keys from the input array. `array_values` is used in the method `find`, but was missing in `findNamespace`.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9614
| License | MIT
| Doc PR | n/a
Edit: should be merged to 2.4
Commits
-------
f5c4011 [Console] Fix undefined offset when formatting namespace suggestions
This PR was merged into the 2.3 branch.
Discussion
----------
Adjusting CacheClear Warmup method to namespaced kernels
Backported the patch in #9525 to the 2.3 branch.
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | have not tried yet
| License | MIT
| Fixed tickets | further fixes#1431
My kernel has been moved and namespaced to `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKernel`. This worked fine until a change was made to how the kernel temp stuff is handled in the warmup phase.
When the app generates its own cache (i.e you run cache without warmup and access the site) everything is generated ok and the .meta files generate the proper reference to the FQN of the Kernel.
However if the warmup is used, it uses `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKerne_` as the temporary Kernel, and when it does "fix references to the Kernel in .meta files" it generates 2 errors.
1. It does not use a string safe tempKernel name, so it never finds the reference to the kernel
2. If you fix that, then it replaces the FQN of the tempKernel with `CfsKernel`, the non-namespaced name of the proper Kernel (it also leaves the character count wrong in the serialization `C:43:<class>` where 43 is the char count for the FQN above)
The two changes above fix this, by escaping the string and replacing it with a FQN Kernel Class name.
What are your thoughts on this? If this sounds reasonable i'll do further enhancements and check tests.
Commits
-------
00d79d5 Adjusting CacheClear Warmup method to namespaced kernels
* 2.4:
[HttpKernel] fixed regression introduced in 2.4 in the base DataCollector class. Added more unit tests coverage for the RequestDataCollector object.
Fixed mistake in upgrade docu
bumped Symfony version to 2.4.0
updated VERSION for 2.4.0-RC1
updated CHANGELOG for 2.4.0-RC1
Container::camelize also takes backslashes into consideration
fixed typos
fixed @expectedException class names
Fix an issue when overriding Client::setServerParameters() and using the getContainer() method in it.
fixed some typos
fixed @expectedException class names
Typo and better wording for german validator translation
* 2.3:
Fixed mistake in upgrade docu
Container::camelize also takes backslashes into consideration
fixed typos
fixed @expectedException class names
fixed some typos
fixed @expectedException class names
Typo and better wording for german validator translation
This PR was merged into the 2.4 branch.
Discussion
----------
[HttpKernel] Http kernel regression fix
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
d1e5006 [HttpKernel] fixed regression introduced in 2.4 in the base DataCollector class. Added more unit tests coverage for the RequestDataCollector object.
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#9616).
Discussion
----------
Fixed mistake in upgrade docu
Commits
-------
821006b Fixed mistake in upgrade docu
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes#9610).
Discussion
----------
Container::camelize also takes backslashes into consideration
I [complained](https://github.com/symfony/symfony/pull/8494) about unreported and unnoticed BC break.
Service names in our DI container contain backslashes and that pull request rendered newer versions of Symfony unusable for us.
This commit fixes this - it normalizes backslashes in service names into underscores.
Commits
-------
0f9bb0a Container::camelize also takes backslashes into consideration
This PR was merged into the 2.2 branch.
Discussion
----------
Fixed some typos
Commits
-------
5c6edb3 fixed some typos
8d69bb5 fixed @expectedException class names
This PR was merged into the 2.4 branch.
Discussion
----------
[HttpKernel] Fix a bug when using the kernel property in overridden method Client::setServerParameters()
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
**TL;DR**
Fixes a fatal error when using `$this->kernel` in overridden `Client::setServerParameters` method happening since @Tobion commit 111ac18232.
**Long story**
In my tests, I'm overriding the `test.client.class` parameter to use a custom class which overrides the `setServerParameters` method with the following code :
```
public function setServerParameters(array $server)
{
if (!isset($server['HTTP_HOST'])) {
$server['HTTP_HOST'] = $this->getContainer()->getParameter('website_domain');
}
parent::setServerParameters($server);
}
```
The purpose is to set the HTTP_HOST variable on every client request in the tests with the application domain (instead of the default value "localhost"). This fixed issues when switching between domains (standard, secure, etc) and also issues with CSRF protection.
If you know of a better idea on how to set this attribute with a value from a DIC parameter to every client request done in any tests in one place without overriding Symfony stuff, I'd be **very glad** to hear it. :)
**Detailed error**
```
[Exception]
PHP Fatal error: Call to a member function getContainer() on a non-object in /home/gnutix/lamp/sf-2.4/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Clie
nt.php on line 48
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:176
PHP 5. PHPUnit_Framework_TestSuite->run() /home/gnutix/lamp/sf-2.4/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:349
PHP 6. PHPUnit_Framework_TestSuite->runTest() /home/gnutix/lamp/sf-2.4/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:745
PHP 7. PHPUnit_Framework_TestCase->run() /home/gnutix/lamp/sf-2.4/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:775
PHP 8. PHPUnit_Framework_TestResult->run() /home/gnutix/lamp/sf-2.4/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:783
PHP 9. PHPUnit_Framework_TestCase->runBare() /home/gnutix/lamp/sf-2.4/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php:648
PHP 10. Gnutix\Tests\FunctionalTestsHelper->setUp() /home/gnutix/lamp/sf-2.4/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:835
PHP 11. Gnutix\Tests\FunctionalTestsHelper::createClient() /home/gnutix/lamp/sf-2.4/src/Gnutix/Tests/FunctionalTestsHelper.php:82
PHP 12. Symfony\Bundle\FrameworkBundle\Test\WebTestCase::createClient() /home/gnutix/lamp/sf-2.4/src/Gnutix/CommonBundle/Tests/FunctionalTestsHelper.php:440
PHP 13. Symfony\Component\DependencyInjection\Container->get() /home/gnutix/lamp/sf-2.4/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.p
hp:49
PHP 14. appTestDebugProjectContainer->getTest_ClientService() /home/gnutix/lamp/sf-2.4/app/bootstrap.php.cache:2033
PHP 15. Symfony\Bundle\FrameworkBundle\Client->__construct() /home/gnutix/lamp/sf-2.4/app/cache/test/appTestDebugProjectContainer.php:5806
PHP 16. Symfony\Component\HttpKernel\Client->__construct() /home/gnutix/lamp/sf-2.4/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php:38
PHP 17. Symfony\Component\BrowserKit\Client->__construct() /home/gnutix/lamp/sf-2.4/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Client.php:46
PHP 18. SymfonyExtension\Bundle\FrameworkBundle\Client->setServerParameters() /home/gnutix/lamp/sf-2.4/vendor/symfony/symfony/src/Symfony/Component/BrowserKit/Clien
t.php:60
PHP 19. Symfony\Bundle\FrameworkBundle\Client->getContainer() /home/gnutix/lamp/sf-2.4/src/SymfonyExtension/Bundle/FrameworkBundle/Client.php:24
```
Commits
-------
ec43a0c Fix an issue when overriding Client::setServerParameters() and using the getContainer() method in it.
This PR was squashed before being merged into the master branch (closes#9597).
Discussion
----------
[Security] Typos in Security's ExpressionLanguage
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9593
| License | MIT
| Doc PR | none
Fixed the ExpressionLanguage and added the tests. It looks ok to me, but please, take a close look (some people will depend on this working right, including me :D ).
Thanks !
Commits
-------
087403b [Security] Typos in Security's ExpressionLanguage
This PR was merged into the master branch.
Discussion
----------
[SecurityBundle] minor simplification in main configuration
As per @stof's suggestion (https://github.com/symfony/symfony/pull/9587#discussion_r7875630).
| 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
Commits
-------
0d8c34b [SecurityBundle] minor simplification in main configuration
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#9599).
Discussion
----------
[Validator] Typo and better wording for german validator translation
Follow up of #9588 as supposed by @craue
Commits
-------
263b618 Typo and better wording for german validator translation
* 2.3: (24 commits)
Add german translation for several validators (Greater/Equal/Less)
No Entity Manager defined exception
fixed CS
[Acl] Fix for issue #9433
[Validator] fix docblock typos
[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
Removed useless check if self::$trustProxies is set
Fix mistake in translation's service definition.
if handler_id is identical to null fix
CS fix
Fixed ModelChoiceList tests in Propel1 bridge.
[AclProvider] Fix incorrect behaviour when partial results returned from cache
Check if the pipe array is empty before calling stream_select()
[Intl] fixed datetime test as described in #9455
bumped Symfony version to 2.3.8
updated VERSION for 2.3.7
updated CHANGELOG for 2.3.7
re-factor Propel1 ModelChoiceList
[Form] Added method Form::getClickedButton() to remove memory leak in FormValidator
[Locale] fixed the failing test described in #9455
...
Conflicts:
src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php
src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php
src/Symfony/Bridge/Propel1/Tests/Propel1TestCase.php
src/Symfony/Component/Form/Tests/CompoundFormTest.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Process/Process.php
* 2.2:
No Entity Manager defined exception
fixed CS
[Acl] Fix for issue #9433
[Validator] fix docblock typos
[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
Fix mistake in translation's service definition.
if handler_id is identical to null fix
CS fix
Fixed ModelChoiceList tests in Propel1 bridge.
[AclProvider] Fix incorrect behaviour when partial results returned from cache
Check if the pipe array is empty before calling stream_select()
re-factor Propel1 ModelChoiceList
[Locale] fixed the failing test described in #9455
[Process] fix phpdoc and timeout of 0
bug #9445 [BrowserKit] fixed protocol-relative url redirection
Conflicts:
src/Symfony/Component/BrowserKit/Tests/ClientTest.php
src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
Add missing german translation for validators
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9575
| License | MIT
| Doc PR |
Some validators do not have german translation yet.
Commits
-------
11fd126 Add german translation for several validators (Greater/Equal/Less)
This PR was merged into the master branch.
Discussion
----------
[SecurityBundle] Added csrf_token_generator and csrf_token_id as new
names for csrf_provider and intention options
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #9176
| License | MIT
| Doc PR | n/a
Commits
-------
f2f15f5 [SecurityBundle] Added csrf_token_generator and csrf_token_id as new names for csrf_provider and intention options