Commit Graph

16254 Commits

Author SHA1 Message Date
Fabien Potencier
ad9008e452 Merge branch '2.2' into 2.3
* 2.2:
  Teardown used wrong property
  Modified guessDefaultEscapingStrategy to not escape txt templates
  Fix DateType for 32bits computers.
  Fixed the registration of validation.xml file when the form is disabled
  When getting the session's id, check if the session is not closed
2013-11-28 11:26:47 +01:00
Fabien Potencier
2f89250c22 bug #9641 [Debug] Avoid notice from being "eaten" by fatal error. (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[Debug] Avoid notice from being "eaten" by fatal error.

Workaround for https://bugs.php.net/bug.php?id=54275. Follow-up to PR #9428 and #9449.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8703
| License       | MIT
| Doc PR        | n/a

Commits
-------

872d584 [Debug] fixed unit tests
2d6c2aa Avoid notice from being *eaten* by fatal error.
2013-11-28 11:26:18 +01:00
Fabien Potencier
872d584c94 [Debug] fixed unit tests 2013-11-28 11:16:43 +01:00
Christian Schmidt
2d6c2aac3a Avoid notice from being *eaten* by fatal error. 2013-11-28 11:16:19 +01:00
Fabien Potencier
9ec6a9c3dc minor #9640 Fixed wrong property in test teardown (fabpot)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9640).

Discussion
----------

Fixed wrong property in test teardown

This PR was submitted on the symfony/EventDispatcher read-only repository and moved automatically to the main Symfony repository (closes symfony/EventDispatcher#2).

Commits
-------

5330603 Teardown used wrong property
2013-11-28 08:36:42 +01:00
Jan Behrens
e1d0d5c1f7 Teardown used wrong property 2013-11-28 08:36:42 +01:00
Fabien Potencier
c3b4b68f51 bug #9639 Modified guessDefaultEscapingStrategy to not escape txt templates (fabpot)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9639).

Discussion
----------

Modified guessDefaultEscapingStrategy to not escape txt templates

This PR was submitted on the symfony/TwigBundle read-only repository and moved automatically to the main Symfony repository (closes symfony/TwigBundle#2).

Useful for plaintext emails.

Commits
-------

6affe94 Modified guessDefaultEscapingStrategy to not escape txt templates
2013-11-28 08:35:42 +01:00
Marek Štípek
9f35368847 Modified guessDefaultEscapingStrategy to not escape txt templates
Useful for plaintext emails.
2013-11-28 08:35:42 +01:00
Fabien Potencier
9b99f094a5 bug #9314 [Form] Fix DateType for 32bits computers. (WedgeSama)
This PR was squashed before being merged into the 2.2 branch (closes #9314).

Discussion
----------

[Form] Fix DateType for 32bits computers.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5227,#5554
| License       | MIT
| Doc PR        | -

Fix an issue due to 32bits machines, date can be only between 1902-2037.
Simply not add date if false. Can be good to add this to 2.3 and master too.

Commits
-------

b80fb43 [Form] Fix DateType for 32bits computers.
2013-11-28 08:06:13 +01:00
WedgeSama
2f9bb75174 Fix DateType for 32bits computers. 2013-11-28 08:06:13 +01:00
Fabien Potencier
3aa4e14d07 bug #9443 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled (hason)
This PR was submitted for the 2.1 branch but it was merged into the 2.2 branch instead (closes #9443).

Discussion
----------

[FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

cfa5aa5 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled
2013-11-28 08:03:21 +01:00
Martin Hasoň
d0c1db82fa Fixed the registration of validation.xml file when the form is disabled 2013-11-28 08:03:21 +01:00
Fabien Potencier
be0a3102cc bug #9625 [HttpFoundation] Do not return an empty session id if the session was closed (Taluu)
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
2013-11-28 07:56:59 +01:00
Fabien Potencier
2d31a0a3e6 bug #9621 [ExpressionLanguage] fixed lexing expression ending with spaces (fabpot)
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
2013-11-28 07:52:02 +01:00
Fabien Potencier
4c0b44ee44 fixed lexing expression ending with spaces 2013-11-28 07:52:02 +01:00
Fabien Potencier
5307874aa5 minor #9636 [Translation] Fixes #9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase (ismailasci)
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
2013-11-28 07:43:59 +01:00
Ismail Asci
6141837628 Fixes #9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase 2013-11-28 07:43:58 +01:00
Fabien Potencier
9651e403e2 bug #9637 [Validator] Replaced inexistent interface (jakzal)
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.
2013-11-28 07:42:01 +01:00
Jakub Zalas
8fd3256248 [Validator] Replaced inexistent interface.
ClassMetadataFactoryInterface was removed in 2.3 and replaced with MetadataFactoryInterface.
2013-11-28 00:06:02 +00:00
Fabien Potencier
8a780a975f bug #9628 [2.4][HttpKernel] Fix profiler event-listener usage outside request stack context (romainneutron)
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
2013-11-27 22:43:00 +01:00
Romain Neutron
55a76e78f0 [HttpKernel] Fix profiler event-listener usage outside request stack context 2013-11-27 18:32:46 +01:00
Baptiste "Talus" Clavié
5b9a727705 When getting the session's id, check if the session is not closed
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
2013-11-27 10:30:56 +01:00
Fabien Potencier
96f58e3bc9 bug #9624 [Console] Fix undefined offset when formatting namespace suggestions (GromNaN)
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
2013-11-27 10:10:40 +01:00
Jérôme Tamarelle
f2d4b323d4 Fix undefined offset when formatting namespace suggestions 2013-11-27 10:10:40 +01:00
Fabien Potencier
7921772901 bug #9605 Adjusting CacheClear Warmup method to namespaced kernels (rdohms)
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
2013-11-26 18:12:57 +01:00
Fabien Potencier
ce64435122 minor #9594 [Security] Fixed typos/CS/PHPDoc (pborreli)
This PR was merged into the master branch.

Discussion
----------

[Security] Fixed typos/CS/PHPDoc

Commits
-------

e1110de Fixed typos/CS/PHPDoc
2013-11-26 17:43:09 +01:00
Fabien Potencier
1fcc7c50e1 Merge branch '2.4'
* 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
2013-11-26 17:42:52 +01:00
Fabien Potencier
990267f959 Merge branch '2.3' into 2.4
* 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
2013-11-26 17:40:27 +01:00
Fabien Potencier
41b5c8ebc8 bug #9617 [HttpKernel] Http kernel regression fix (hhamon)
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.
2013-11-26 15:41:54 +01:00
Hugo Hamon
d1e5006df4 [HttpKernel] fixed regression introduced in 2.4 in the base DataCollector class. Added more unit tests coverage for the RequestDataCollector object. 2013-11-26 13:58:53 +01:00
Fabien Potencier
da90eb911d minor #9616 Fixed mistake in upgrade docu (theaxel)
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
2013-11-26 13:40:10 +01:00
Axel K
3a2ae3861b Fixed mistake in upgrade docu 2013-11-26 13:40:10 +01:00
Fabien Potencier
a5408b0a2a bumped Symfony version to 2.4.0 2013-11-25 22:22:41 +01:00
Fabien Potencier
32ceb0b89c updated VERSION for 2.4.0-RC1 2013-11-25 20:35:53 +01:00
Fabien Potencier
44cd4963d5 updated CHANGELOG for 2.4.0-RC1 2013-11-25 20:34:02 +01:00
Fabien Potencier
40b5314acc bug #9610 Container::camelize also takes backslashes into consideration (ondrejmirtes)
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
2013-11-25 16:01:27 +01:00
Ondrej Mirtes
e30a7d072d Container::camelize also takes backslashes into consideration 2013-11-25 16:01:27 +01:00
Fabien Potencier
222564c0b0 fixed typos 2013-11-25 16:00:46 +01:00
Fabien Potencier
19caa6a311 fixed @expectedException class names 2013-11-25 15:52:16 +01:00
Fabien Potencier
e0b751a2d8 Merge branch '2.2' into 2.3
* 2.2:
  fixed some typos
  fixed @expectedException class names

Conflicts:
	src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php
	src/Symfony/Component/Console/Tests/Command/CommandTest.php
	src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
	src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php
2013-11-25 15:49:41 +01:00
Fabien Potencier
763c8aa09b minor #9603 Fixed some typos (fabpot)
This PR was merged into the 2.2 branch.

Discussion
----------

Fixed some typos

Commits
-------

5c6edb3 fixed some typos
8d69bb5 fixed @expectedException class names
2013-11-25 15:47:45 +01:00
Fabien Potencier
b0a04cc316 bug #9607 [HttpKernel] Fix a bug when using the kernel property in overridden method Client::setServerParameters() (gnutix)
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.
2013-11-25 14:14:08 +01:00
Dorian Villet
ec43a0caf2 Fix an issue when overriding Client::setServerParameters() and using the getContainer() method in it. 2013-11-25 13:34:16 +01:00
Rafael Dohms
00d79d559d Adjusting CacheClear Warmup method to namespaced kernels
Backported the patch in #9525 to the 2.3 branch.
2013-11-25 11:32:15 +01:00
Fabien Potencier
5c6edb3685 fixed some typos 2013-11-25 11:21:43 +01:00
Fabien Potencier
8d69bb5886 fixed @expectedException class names 2013-11-25 09:44:14 +01:00
Matthias Pigulla
05dc0e17b2 Consider KERNEL_DIR setting as relative to the PhpUnit XML file if it does not point to a directory (relative to the current cwd) 2013-11-24 23:56:46 +01:00
Fabien Potencier
4aab341d59 updated version to 2.5 2013-11-24 21:17:07 +01:00
Fabien Potencier
419e10dcc7 bug #9597 [Security] Typos in Security's ExpressionLanguage (ovrflo)
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
2013-11-24 19:29:24 +01:00
Catalin Dan
087403b71d [Security] Typos in Security's ExpressionLanguage 2013-11-24 19:29:24 +01:00