Commit Graph

13553 Commits

Author SHA1 Message Date
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
4c0b44ee44 fixed lexing expression ending with spaces 2013-11-28 07:52:02 +01:00
Ismail Asci
6141837628 Fixes #9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase 2013-11-28 07:43:58 +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
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
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
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
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
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
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
Daniel Tschinder
2fe9cd351a Typo and better wording for german validator translation 2013-11-24 19:25:32 +01:00
Douglas Greenshields
0d8c34b652 [SecurityBundle] minor simplification in main configuration 2013-11-24 14:33:29 +00:00
Pascal Borreli
e1110de107 Fixed typos/CS/PHPDoc 2013-11-24 06:12:30 +00:00
Fabien Potencier
43becff31d Merge branch '2.3'
* 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
2013-11-23 22:17:02 +01:00
Fabien Potencier
dfc54f9e96 Merge branch '2.2' into 2.3
* 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
2013-11-23 22:11:41 +01:00
Daniel Tschinder
11fd126f15 Add german translation for several validators (Greater/Equal/Less) 2013-11-23 18:11:09 +01:00
Fabien Potencier
f0c83bb3cb feature #9587 [SecurityBundle] Added csrf_token_generator and csrf_token_id as new (shieldo)
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
2013-11-23 13:25:01 +01:00
Douglas Greenshields
f2f15f54f9 [SecurityBundle] Added csrf_token_generator and csrf_token_id as new
names for csrf_provider and intention options
2013-11-23 10:55:30 +00:00
Fabien Potencier
b81494133d [DomCrawler] fixed a PHPDoc 2013-11-23 08:20:18 +01:00
Alexander Obuhovich
13168bcbeb Fixes attr method returning empty string for missing attributes 2013-11-23 08:18:27 +01:00
Fabien Potencier
d8893c4d64 bug #9565 [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error (jakzal)
This PR was merged into the master branch.

Discussion
----------

[Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error

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

It might happen that `require_once` will include a file second time (for example with links or case-changed paths). Therefore we need to check if a class exists before requiring the file.

I also removed an unused argument from two methods (`$loader`).

Commits
-------

0baae4c [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error.
2013-11-23 08:01:41 +01:00
Fabien Potencier
862f5e5882 bug #9525 Cache Warmup Breaks Namespaced Kernel (rdohms)
This PR was merged into the master branch.

Discussion
----------

Cache Warmup Breaks Namespaced Kernel

| 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
-------

9e7788e Cache Warmup Breaks Namespaced Kernel
2013-11-23 07:56:00 +01:00
Jakub Zalas
0baae4cde6 [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error.
It might happen that require_once will include a file second time (for
example with links or case-changed paths). Therefore we need to check
if a class exists before requiring the file.
2013-11-22 20:12:05 +00:00
Fabien Potencier
3c5a863330 bug #9447 [BrowserKit] fixed protocol-relative url redirection (jong99)
This PR was merged into the 2.2 branch.

Discussion
----------

[BrowserKit] fixed protocol-relative url redirection

Fixed redirects to protocol relative URLs, e.g. //www.example.org.  Previously the code would treat this as a relative URL.

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

Commits
-------

e8b5c84 bug #9445 [BrowserKit] fixed protocol-relative url redirection
2013-11-22 18:44:10 +01:00
Fabien Potencier
b74a887cd9 minor #9487 unify constructor initialization style throughout symfony (Tobion)
This PR was merged into the master branch.

Discussion
----------

unify constructor initialization style throughout symfony

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

In almost all classes symfony uses property initialization when the value is static. Constructor initialization is only used for things that actually have logic, like passed parameters or dynamic values. IMHO it makes the code much more readable because property definition, phpdoc and default value is in one place. Also one can easily see what the constructor implements for logic like overridden default value of a parent class. Otherwise the real deal is just hidden behind 10 property initializations. One more advantage is that it requires less code. As you can see, the code was almost cut in half (210 additions and 395 deletions).
I unified it accordingly across symfony. Sometimes it was [not even consistent within one class](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Config/Definition/BaseNode.php#L32). At the same time I recognized some errors like missing parent constructor call, or undefined properties or private properties that are not even used.

I then realized that a few Kernel tests were not passing because they were deeply implementation specific like modifying booted flag with a custom `KernelForTest->setIsBooted();`. I improved and refactored the kernel tests in the __second commit__.

__Third commit__ unifies short ternary operator, e.g. `$foo ?: new Foo()`. __Forth commit__ unifies missing parentheses, e.g. `new Foo()`.

Commits
-------

077a089 unify missing parentheses
2888594 unify short ternary operator
2a9daff [HttpKernel] better written kernel tests
111ac18 unify constructor initialization style throughout symfony
2013-11-22 18:42:00 +01:00
Thomas Tourlourat
af98688f94 No Entity Manager defined exception 2013-11-22 18:33:29 +01:00
Fabien Potencier
efff757e24 fixed CS 2013-11-22 18:29:47 +01:00
Fabien Potencier
572c3bb900 minor #9481 [HttpFoundation] fixed the issue described in #9480 (andremaha)
This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] fixed the issue described in #9480

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

Commits
-------

7d35ce3 [HttpFoundation] fixed the issue described in #9480
2013-11-22 18:25:24 +01:00
Fabien Potencier
0e57c7b757 fixed CS 2013-11-22 18:23:33 +01:00
Fabien Potencier
90dfc9ee08 bug #9485 [Acl] Fix for issue #9433 (guilro)
This PR was squashed before being merged into the 2.2 branch (closes #9485).

Discussion
----------

[Acl] Fix for issue #9433

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

Two new test for issue #9433 :
`testUpdateAclInsertingMultipleObjectFieldAcesThrowsDBConstraintViolations()`
`testUpdateAclDeletingObjectFieldAcesThrowsDBConstraintViolations()`

The change to `updateAces()` line 857 is enough to make the first test succeed. When changing the `order` field value to a higher value, we must first change the value of the next entry (and all the next entries recursively) to preserve uniqueness of the `order` field in the database.

All the other changes are for the second test. In the former `updateAcl()` method, we commit the changes of the existing ACEs to the database before deleting or adding the new ones. We must delete the old ACEs before changing the existing ACEs in order to preserve uniqueness of the `order` field in the database.

Commits
-------

a38fab9 [Acl] Fix for issue #9433
2013-11-22 18:20:31 +01:00
Guillaume Royer
a38fab9b83 [Acl] Fix for issue #9433 2013-11-22 18:20:31 +01:00
Fabien Potencier
0434c7435d minor #9466 [Process] fix phpdoc and timeout of 0 (Tobion)
This PR was merged into the 2.2 branch.

Discussion
----------

[Process] fix phpdoc and timeout of 0

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

getTimeout says it returns null when it's disabled. But passing 0 or 0.0 also disabled timeouts. So it should be treated as null as well. also it says it returns integer whereas it returns float.

Commits
-------

1758010 [Process] fix phpdoc and timeout of 0
2013-11-22 18:11:04 +01:00
Fabien Potencier
be0a605fc0 bug #9516 [AclProvider] Fix incorrect behavior when partial results returned from cache (superdav42)
This PR was merged into the 2.2 branch.

Discussion
----------

[AclProvider] Fix incorrect behavior when partial results returned from cache

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

[AclProvider] Fix incorrect behavior when partial results returned from cache

findAcls wasn't throwing the NotAllAclsFoundException with the partial result when some acls were retrieved from the cache. This will fix that behavior. Ideally we would update it to cache items that were not found so it wouldn't have to query the db every time for non existent items, but I'm not sure if that is possible.
I'm not sure if the ACL cache is being used very much, I didn't find any docs about it but it seems to work except for this issue. It might be more appropriate to merge the fix in master if no one is relying on it to work in 2.2.

Commits
-------

edae59c [AclProvider] Fix incorrect behaviour when partial results returned from cache
2013-11-22 18:06:22 +01:00
Fabien Potencier
5e034fa3a2 minor #9554 [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class (hhamon)
This PR was merged into the 2.2 branch.

Discussion
----------

[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class

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

Commits
-------

7730d8d [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
2013-11-22 18:05:49 +01:00
Fabien Potencier
415e0d06df minor #9542 unify and fix callable phpdoc throughout symfony (Tobion)
This PR was merged into the master branch.

Discussion
----------

unify and fix callable phpdoc throughout symfony

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

I unified the phpdoc to use "callable" as type. It wasn't done consistently. It varied between mixed, callback, callable.
I think callable is best because php 5.4 even has a typehint callable.

Commits
-------

6d5ddce unify and fix callable phpdoc throughout symfony
2013-11-22 17:55:47 +01:00
Fabien Potencier
8d8b3db758 feature #9546 [FrameworkBundle] use the new request_stack service in the GlobalVariables object (hhamon)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] use the new request_stack service in the GlobalVariables object

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

Commits
-------

9c2ce49 [FrameworkBundle] use the new request_stack object in the GlobalVariables object
2013-11-22 17:52:08 +01:00
Fabien Potencier
60eb4f630d bug #9566 [Console] Revert BC-break for verbose option value (chEbba)
This PR was merged into the master branch.

Discussion
----------

[Console] Revert BC-break for verbose option value

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

Closes #9285

----

PR #8835 "fixed" the input value for verbosity option with `VALUE_OPTIONAL`. And syntax like
```
cli.php -v command
cli.php --verbose command
```
Is broken now, because `ArgvInput` tries to use argument as verbose value (#9285).
For now i added a test for this case and revert this changes.

Commits
-------

432bbe1 [Console] Revert a28eb8 because of BC break
5e03e9a [Console] Add test for --verbose before argument
2013-11-22 17:23:52 +01:00
Fabien Potencier
a8c74d1880 [Security] optimized ExpressionVoter 2013-11-22 14:45:43 +01:00
Kirill chEbba Chebunin
432bbe1af8 [Console] Revert a28eb8 because of BC break 2013-11-22 04:30:18 +04:00
Kirill chEbba Chebunin
5e03e9ad72 [Console] Add test for --verbose before argument 2013-11-22 04:30:09 +04:00
Fabien Potencier
e49ca36120 bug #9553 [FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class (hhamon)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class

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

Commits
-------

2e07338 [FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class
2013-11-21 18:10:54 +01:00
Hugo Hamon
2e07338c5c [FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class 2013-11-21 11:59:04 +01:00
Fabien Potencier
95b2d02ce9 feature #9541 [Translation] make IdentityTranslater consistent with normal translator (Tobion)
This PR was merged into the master branch.

Discussion
----------

[Translation] make IdentityTranslater consistent with normal translator

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

The MessageSelector should not be required in the constructor of the IdentityTranslator because it's also optional for the [Translator](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Translation/Translator.php#L64).
I also fixed the TranslatorInterface phpdoc and the IdentityTranslator params similar to 90a20d7835

Commits
-------

7cdb260 [Translation] make IdentityTranslater consistent with normal translator
2013-11-21 08:05:43 +01:00
Fabien Potencier
bb7ac471de minor #9540 [Security] Added a missing field in SimpleAuthenticationHandler (jakzal)
This PR was squashed before being merged into the master branch (closes #9540).

Discussion
----------

[Security] Added a missing field in SimpleAuthenticationHandler

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

Added tests and made a small CS fix as a bonus.

Btw, the properties are protected. Do we really want to provide extension points here?

Commits
-------

d553347 [Security] Added a missing field in SimpleAuthenticationHandler
2013-11-21 07:37:18 +01:00
Jakub Zalas
d553347549 [Security] Added a missing field in SimpleAuthenticationHandler 2013-11-21 07:37:18 +01:00
Fabien Potencier
b5cacc54cc bug #9536 [FrameworkBundle] Update 2 dependencies (currently broken) (asm89)
This PR was squashed before being merged into the master branch (closes #9536).

Discussion
----------

[FrameworkBundle] Update 2 dependencies (currently broken)

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

## Dependency on http-foundation

In b1a062d232 the `RequestStack` was moved to `http-foundation`, because of this the `framework-bundle` now also depends on `http-foundation`: b1a062d232 (diff-3) (at least in services.xml).

We got an error while installing the framework-bundle `2.4.*` with `prefer-stable` in our composer.json. We currently get framework-bundle 2.4 with http-kernel and http-foundation 2.3. An alternative fix would be raising the requirement of http-kernel to 2.4, but I think this is the "purest" declaration of dependencies.

Update 1
## Dependency on config

In 05e9ca7509 the config component was updated with an xml reference dumper for configuration. In the same commit the frameworkbundle dump command is updated to make use of the 2 newly introduced classes. It is currently possible to get an installation with config `2.3`, which in turn leads to an exception when running the dump-reference command:

```
 $ app/console config:dump-reference framework
# Default configuration for extension with alias: "framework"
PHP Fatal error:  Class 'Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper
```

Update 2
## Dependency on http-kernel
We just found out that the dependency on http-kernel should also be updated to `2.4`. That's because the framework-bundle injects the `RequestStack` now and doesn't set the request on the `RouterListener` service anymore. Without updating the dependency it is possible to get a `RouterListener` that is not aware of the request stack (< 2.4) and none of your routes will work.

*tests are failing because of some race condition I guess?*

Commits
-------

fe5d8f8 [FrameworkBundle] Update 2 dependencies (currently broken)
2013-11-21 07:34:10 +01:00
Alexander
fe5d8f86a8 [FrameworkBundle] Update 2 dependencies (currently broken) 2013-11-21 07:34:10 +01:00
Fabien Potencier
21fa63532e bug #9352 [Intl] make currency bundle merge fallback locales when accessing data, ... (shieldo)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] make currency bundle merge fallback locales when accessing data, ...

...allowing use of country-specific locales

Fixes #9262.

Commits
-------

edc287b [Intl] make currency bundle merge fallback locales when accessing data, allowing use of country-specific locales
2013-11-21 07:11:51 +01:00
Douglas Greenshields
8d32c9cd0b [Validator] fix docblock typos 2013-11-20 18:57:15 +00:00
Hugo Hamon
7730d8d393 [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class 2013-11-20 19:23:10 +01:00
Hugo Hamon
9c2ce49d92 [FrameworkBundle] use the new request_stack object in the GlobalVariables object 2013-11-20 13:37:49 +01:00
Tobias Schultze
6d5ddce9a4 unify and fix callable phpdoc throughout symfony 2013-11-20 10:25:10 +01:00
Tobias Schultze
7cdb26066f [Translation] make IdentityTranslater consistent with normal translator 2013-11-20 03:31:35 +01:00
Fabien Potencier
a77cc5728b minor #9521 CS fix (peterkokot)
This PR was merged into the 2.2 branch.

Discussion
----------

CS fix

I hope this is not BC break though handler_id checking should be done with identical comparison operator I believe.

Commits
-------

1b6b1e9 if handler_id is identical to null fix
2013-11-19 19:31:08 +01:00
Fabien Potencier
61a0230743 minor #9520 CS fix (peterkokot)
This PR was merged into the 2.2 branch.

Discussion
----------

CS fix

Commits
-------

f348731 CS fix
2013-11-19 19:30:37 +01:00
Fabien Potencier
8d85745430 minor #9518 Fixed typos (pborreli)
This PR was merged into the master branch.

Discussion
----------

Fixed typos

Commits
-------

8ebf7c5 Fixed typos
2013-11-19 19:29:47 +01:00
Daniel Tschinder
5b3b40c044 Removed useless check if self::$trustProxies is set
In Request::getClientIps() on line 772 there is a check if self::$trustedProxies is not set. If this condition evaluates to true the method will return.
Because of this the second identical check on line 783 will never evaluate to true, as when reaching this position self::$trustedProxies must be set.
2013-11-19 19:28:40 +01:00
Michaël VEROUX
5719d84ae4 Fix mistake in translation's service definition. 2013-11-19 19:26:27 +01:00
Fabien Potencier
1a992908f1 minor #9531 Add missing dependency to expression-language (armetiz)
This PR was merged into the master branch.

Discussion
----------

Add missing dependency to expression-language

Add missing dependency, without this dependency, PHPUnit can't run successfully.

Commits
-------

4206e98 Add missing dependency to expression-language
2013-11-19 19:25:17 +01:00
Francois Zaninotto
76efcc7f8c Remove executable bit on PHP file 2013-11-19 14:48:58 +01:00
Thomas Tourlourat
4206e98f01 Add missing dependency to expression-language 2013-11-19 14:20:36 +01:00
Wouter J
b521dc5ace [ExpressionLanguage] Fixed conflict between punctation and range 2013-11-18 22:05:18 +01:00
Rafael Dohms
9e7788ea80 Cache Warmup Breaks Namespaced Kernel
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?
2013-11-18 11:39:25 +01:00
Peter Kokot
1b6b1e9bfb if handler_id is identical to null fix 2013-11-17 15:05:15 +01:00
Peter Kokot
f3487312b7 CS fix 2013-11-17 14:39:12 +01:00
Jakub Zalas
df90c623f9 [Debug] Fixed a typo. 2013-11-16 18:00:51 +00:00
Pascal Borreli
8ebf7c5515 Fixed typos 2013-11-16 15:13:54 +00:00
Jakub Zalas
1e2d14ebb5 Fixed ModelChoiceList tests in Propel1 bridge. 2013-11-16 13:14:05 +00:00
David Stone
edae59c242 [AclProvider] Fix incorrect behaviour when partial results returned from cache 2013-11-15 12:54:31 -07:00
Jonathan Poston
52a18ea163 Check if the pipe array is empty before calling stream_select() 2013-11-15 17:36:11 +01:00
Fabien Potencier
6316de572a bug #9211 [Form] Fixed memory leak in FormValidator (bschussek)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed memory leak in FormValidator

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

Commits
-------

1bb7e4d [Form] Added method Form::getClickedButton() to remove memory leak in FormValidator
5329ab5 [Form] Fixed memory leak in FormValidator
2013-11-14 21:58:12 +01:00
Tobias Schultze
077a089b4e unify missing parentheses 2013-11-14 15:30:56 +01:00
Tobias Schultze
2888594dbd unify short ternary operator 2013-11-14 15:22:38 +01:00
Fabien Potencier
43371bb754 bug #9469 [2.2][Propel1] re-factor Propel1 ModelChoiceList (havvg)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Propel1] re-factor Propel1 ModelChoiceList

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | fixes propelorm/Propel#789
| License       | MIT

replaces #9458

Commits
-------

613b5f6 re-factor Propel1 ModelChoiceList
2013-11-14 14:42:38 +01:00
Andrey Esaulov
056d83646f [Intl] fixed datetime test as described in #9455 2013-11-14 12:38:26 +01:00
Fabien Potencier
a954df4b6e bumped Symfony version to 2.3.8 2013-11-14 10:43:43 +01:00
Fabien Potencier
2829b47187 updated VERSION for 2.3.7 2013-11-14 08:58:51 +01:00
Fabien Potencier
74201e01ce minor #9479 [Locale] fixed the failing test described in #9455 (andremaha)
This PR was merged into the 2.2 branch.

Discussion
----------

[Locale] fixed the failing test described in #9455

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

Commits
-------

3f91039 [Locale] fixed the failing test described in #9455
2013-11-14 06:54:51 +01:00
Fabien Potencier
587f355137 Merge branch '2.3'
* 2.3: (25 commits)
  bumped Symfony version to 2.2.11
  updated VERSION for 2.2.10
  update CONTRIBUTORS for 2.2.10
  updated CHANGELOG for 2.2.10
  fixed version
  Request::overrideGlobals() may call invalid ini value
  Force Luhn Validator to only work with strings
  Fixed bug with lazy services
  [Translation] fixed the error in the dumper test as described in #9475
  deleted mixing string concatenation inside a sprintf
  "__call()" should be displayed only if $this->magicCall is true
  [Console] fix phpdoc and constructor default value
  Add media-query for printing: Do not print the toolbar.
  Fix ProgressHelper redraw when redrawFreq is greater than 1
  Update toolbar.css.twig
  slovenian translations fixed
  slovenian translations fixed
  [DependencyInjection] fixed YamlDumper did not make services private.
  [FrameworkBundle] fix routing container parameter exception message
  [Form] fix and unify phpdoc
  ...

Conflicts:
	src/Symfony/Component/Console/Helper/ProgressHelper.php
	src/Symfony/Component/DependencyInjection/ContainerBuilder.php
	src/Symfony/Component/HttpKernel/Kernel.php
2013-11-13 22:30:16 +01:00
Fabien Potencier
59a4313a52 Merge branch '2.2' into 2.3
* 2.2:
  bumped Symfony version to 2.2.11
  updated VERSION for 2.2.10
  update CONTRIBUTORS for 2.2.10
  updated CHANGELOG for 2.2.10
  fixed version
  Request::overrideGlobals() may call invalid ini value
  Force Luhn Validator to only work with strings
  [Translation] fixed the error in the dumper test as described in #9475
  [Console] fix phpdoc and constructor default value

Conflicts:
	src/Symfony/Component/Console/Helper/ProgressHelper.php
	src/Symfony/Component/HttpKernel/Kernel.php
2013-11-13 22:27:40 +01:00
Fabien Potencier
16b01ec1bc bumped Symfony version to 2.2.11 2013-11-13 22:22:57 +01:00
Fabien Potencier
14979a3bf9 updated VERSION for 2.2.10 2013-11-13 15:29:12 +01:00
Fabien Potencier
72d961847f fixed version 2013-11-13 15:28:11 +01:00
Daisuke Ohata
9bc76ca13d Request::overrideGlobals() may call invalid ini value
According to http://php.net/manual/ja/ini.core.php ,
there's not variable_order, but variables_order (with trailing "s").

Perhaps it breaks BC for some developer who unsets
'request_order' ini value and sets 'variable_order' manually?
2013-11-13 09:30:53 +01:00
Fabien Potencier
42346ea3a2 made Router implement RequestMatcherInterface 2013-11-12 08:05:02 +01:00
Tobias Schultze
2a9daff8d9 [HttpKernel] better written kernel tests 2013-11-11 19:41:19 +01:00
Tobias Schultze
111ac18232 unify constructor initialization style throughout symfony 2013-11-11 19:40:07 +01:00
Toni Uebernickel
613b5f647b re-factor Propel1 ModelChoiceList
* add BaseModelChoiceListTest ensuring compatibility
* fix keys and order are preserved
* fix lazy-load to use filters of initial query
2013-11-11 10:47:50 +01:00
Andrey Esaulov
7d35ce3584 [HttpFoundation] fixed the issue described in #9480 2013-11-09 17:25:44 +01:00
Fabien Potencier
b76ac2f865 [Console] simplified code (refs #9420) 2013-11-09 17:01:15 +01:00
Fabien Potencier
d5436e38e9 bug #9420 [Console][ProgressHelper] Fix ProgressHelper redraw when redrawFreq is greater than 1 (giosh94mhz)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console][ProgressHelper] Fix ProgressHelper redraw when redrawFreq is greater than 1

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

When using a ProgressHelper object with redrawFreq > 1, there are situation where redraw may never occur.
E.g.

    redrawFreq = 2
    setContent = 1
    advance(2) ... the redraw event is detected by 0 == current % redrawFreq.

I've tested the patch against phpunit and my local environment.

Maybe, a new test can be implemented to avoid the previous example, but I'm not familiar with mock object... :)

Commits
-------

5eca1fb Fix ProgressHelper redraw when redrawFreq is greater than 1
2013-11-09 16:59:42 +01:00
Daniel Richter
1e410c7bcb Force Luhn Validator to only work with strings
The Luhn Validator fails to work with float or large integers (internally turned into float by php, depending on precision setting).
This is problematic because developers might use number or integer form fields to capture credit card data, which will lead to a validation error even though the form input itself was valid. This commit makes validator throw UnexpectedTypeException on non-string input to avoid this confusion.
2013-11-09 16:57:10 +01:00
Peter Rehm
9010e4657a Fixed bug with lazy services 2013-11-09 16:43:20 +01:00
Bernhard Schussek
1bb7e4dc7b [Form] Added method Form::getClickedButton() to remove memory leak in FormValidator 2013-11-09 16:25:41 +01:00
Andrey Esaulov
3f91039b14 [Locale] fixed the failing test described in #9455 2013-11-09 14:46:08 +01:00
Andrey Esaulov
853404a11e [Translation] fixed the error in the dumper test as described in #9475 2013-11-09 13:40:25 +01:00
Fabien Potencier
b9b7c8ac8e minor #9427 adjust doctrine dependencies (Tobion)
This PR was merged into the master branch.

Discussion
----------

adjust doctrine dependencies

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

I went through all components/bundles/bridges in symfony and searched for doctrine dependencies. Then looked if it only requires a subset (annotations instead of common for example).

Commits
-------

7366901 adjust doctrine dependencies
2013-11-09 13:05:18 +01:00
Fabien Potencier
b8ec2bfdf0 minor #9407 [Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput() (bschussek)
This PR was merged into the master branch.

Discussion
----------

[Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput()

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

I renamed `flushOutput()` and `flushErrorOutput()` to `clearOutput()` and `clearErrorOutput()` since I find the current naming unintuitive. When reading [the blog post about this feature](http://symfony.com/blog/new-in-symfony-2-4-flushing-stdout-and-stderr-on-a-process) I initially thought that the output would be flushed to the console (as in `ob_flush()`).

Using "clear" on the other hand conforms well with [our conventions](http://symfony.com/doc/current/contributing/code/conventions.html).

Commits
-------

1811367 [Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput()
2013-11-09 13:03:12 +01:00
Abdellatif AitBoudad
1727bece84 deleted mixing string concatenation inside a sprintf 2013-11-09 12:59:39 +01:00
Abdellatif AitBoudad
5b0f8787cf "__call()" should be displayed only if $this->magicCall is true 2013-11-09 12:59:39 +01:00
Fabien Potencier
705384bc5f minor #9450 Fixed typos (pborreli)
This PR was squashed before being merged into the master branch (closes #9450).

Discussion
----------

Fixed typos

Commits
-------

e8af42e Fixed typos
2013-11-09 12:55:32 +01:00
Pascal Borreli
e8af42e780 Fixed typos 2013-11-09 12:55:32 +01:00
Fabien Potencier
d30ffe6d2e bug #9461 set mergeFallback to true, (ychadwick)
This PR was merged into the master branch.

Discussion
----------

set mergeFallback to true,

If your default locale is de_CH for example, then you get an incomplete list of locales. This issue has been resolved in the LanguageBundle and RegionBundle but not in for the LocaleBundle. Would be also a good idea for the CurrencyBundle

Commits
-------

4587d4e set mergeFallback to true, otherwise an uncomplete list is shown with default locale is for example de_CH
2013-11-09 12:39:25 +01:00
Fabien Potencier
d7db2452f1 minor #9347 [WebProfilerBundle] Small bugfix in CSS: don't make links bold. (bobdenotter)
This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] Small bugfix in CSS: don't make links bold.

If the CSS in your application has something like `a { font-weight: bold; }` to make links bold by default, they will also show up **bold** in the profilers toolbar, which doesn't look right. This patch explicitly sets the font-weight to 'normal', as it should be.

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

Commits
-------

984566d Add media-query for printing: Do not print the toolbar.
cf1b7cf Update toolbar.css.twig
b6738b6 Set the font-weight for links to 'normal', to prevent ugly bold links.
2013-11-09 12:27:55 +01:00
Fabien Potencier
99b2570803 bug #9451 Fix bug with variable named context to securityContext (mieszko4)
This PR was merged into the master branch.

Discussion
----------

Fix bug with variable named context to securityContext

Commits
-------

38433d7 Fix bug with variable named context to securityContext in SimplePreAuthenticationListener->handle function
2013-11-09 12:25:24 +01:00
Peter Rehm
03a76f5da1 Added missing parameter to the compile function 2013-11-08 16:59:08 +01:00
Tobias Schultze
fa4075e6d1 [Console] fix phpdoc and constructor default value 2013-11-08 01:49:34 +01:00
Tobias Schultze
17580107c9 [Process] fix phpdoc and timeout of 0 2013-11-08 01:33:52 +01:00
Yorkie Chadwick
4587d4e28a set mergeFallback to true, otherwise an uncomplete list is shown with default locale is for example de_CH 2013-11-07 16:35:54 +01:00
Tobias Schultze
7366901691 adjust doctrine dependencies 2013-11-07 14:20:52 +01:00
mieszko4
38433d765c Fix bug with variable named context to securityContext in SimplePreAuthenticationListener->handle function 2013-11-05 22:11:59 +01:00
Bob den Otter
984566d9df Add media-query for printing: Do not print the toolbar. 2013-11-05 16:26:57 +01:00
Giorgio Premi
5eca1fb01a Fix ProgressHelper redraw when redrawFreq is greater than 1 2013-11-05 16:14:13 +01:00
Bob den Otter
cf1b7cfdef Update toolbar.css.twig 2013-11-05 16:00:59 +01:00
Jonathan Gough
e8b5c84c12 bug #9445 [BrowserKit] fixed protocol-relative url redirection 2013-11-05 13:40:12 +00:00
Fabien Potencier
8890627798 fixed visibility 2013-11-04 10:03:40 +01:00
Fabien Potencier
0ab9c8d046 moved logic for the session listeners into the HttpKernel component 2013-11-04 07:11:47 +01:00
Fabien Potencier
25160e39d2 minor #9437 Slovenian translations fixed for Symfony 2.3 (peterkokot)
This PR was merged into the 2.3 branch.

Discussion
----------

Slovenian translations fixed for Symfony 2.3

Commits
-------

1ec42ec slovenian translations fixed
2013-11-04 07:10:28 +01:00
Fabien Potencier
8f0faee45e Merge branch '2.2' into 2.3
* 2.2:
  slovenian translations fixed
  [DependencyInjection] fixed YamlDumper did not make services private.
  [FrameworkBundle] fix routing container parameter exception message
  update CONTRIBUTORS
  added content length header to BinaryFileResponse
  [Routing] added working test case for issue #5135
2013-11-04 07:09:51 +01:00
Peter Kokot
08191303cd slovenian translations fixed 2013-11-04 02:00:27 +01:00
Peter Kokot
1ec42ec590 slovenian translations fixed 2013-11-04 01:55:20 +01:00
Rouven Weßling
e8c2082c04 [DependencyInjection] fixed YamlDumper did not make services private. 2013-11-03 00:57:38 +01:00
Fabien Potencier
dec28d19d6 bug #9332 [Config] Quoting reserved characters (WouterJ)
This PR was merged into the master branch.

Discussion
----------

[Config] Quoting reserved characters

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

Commits
-------

a5c0123 Use Inline class to quote reserved characters
2013-11-01 07:15:42 +01:00
Wouter J
a5c0123e35 Use Inline class to quote reserved characters 2013-10-31 20:29:46 +01:00
Fabien Potencier
3502ca22a6 minor #9244 [Console] make parent constructor test more reliable (Tobion)
This PR was merged into the master branch.

Discussion
----------

[Console] make parent constructor test more reliable

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixes   | #9186 , f2b60e9
| Tests pass?   | yes
| license?      | MIT

It also fixes the test since f2b60e9 and improves phpdoc

The second commit improves regex performance to validate name (using possesive quantifier).

I did some basic performance tests http://3v4l.org/PuvuL
The new regex only takes 1/3 of the time compared to the old one!

Commits
-------

5798029 [Console] improve regex performance to validate name
22b09ce [Console] make parent constructor test more reliable
2013-10-31 17:40:24 +01:00
Fabien Potencier
cac4aaa4ee bug #9416 fixed issue with clone now the children of the original form are preserved and the clone form is given new children (yjv)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed issue with clone now the children of the original form are preserved and the clone form is given new children

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

Commits
-------

b952bcb fixed issue with clone now the children of the original form are preserved and the clone form is given new children
2013-10-31 16:59:00 +01:00
Fabien Potencier
7455650904 bug #9423 [Form] fix CsrfProviderAdapter (Tobion)
This PR was merged into the master branch.

Discussion
----------

[Form] fix CsrfProviderAdapter

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixes   | #9418
| Tests pass?   | yes
| license?      | MIT

Commits
-------

887f71c [Form] fix CsrfProviderAdapter
2013-10-31 16:58:10 +01:00
Fabien Potencier
81ceee5f9a minor #9425 [Form] fix and unify phpdoc (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] fix and unify phpdoc

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| license?      | MIT

- Fixes FormTypeGuesserInterface that must return ValueGuess for guessRequired etc. instead of abstract Guess because its excepted for example by FormFactory.
- Unify array typehints that was not done consistently.

Commits
-------

7a754c3 [Form] fix and unify phpdoc
2013-10-31 16:57:44 +01:00
Fabien Potencier
143af6d626 minor #9370 [FrameworkBundle] add test for #5135 and simplify routing container parameter resolution (Tobion)
This PR was merged into the 2.2 branch.

Discussion
----------

[FrameworkBundle] add test for #5135 and simplify routing container parameter resolution

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixes   | #5135
| Tests pass?   | yes
| license?      | MIT

1. [FrameworkBundle] added working test case for issue #5135
2. [FrameworkBundle] fix routing container parameter exception message which did not really make sense and improve regex performance

Commits
-------

719e037 [FrameworkBundle] fix routing container parameter exception message
8513ac9 [Routing] added working test case for issue #5135
2013-10-31 16:51:38 +01:00
Tobias Schultze
719e0377bb [FrameworkBundle] fix routing container parameter exception message
also improve regex performance and fix implementation-specific written tests and typo
2013-10-31 16:19:00 +01:00
Tobias Schultze
7a754c36a4 [Form] fix and unify phpdoc 2013-10-31 15:15:49 +01:00
Luis Cordova
d44fd2dd1f fixes #9342 adding on-invalid="ignore" (= null on constructor argument) 2013-10-31 08:45:52 -05:00
Fabien Potencier
f8e88bc7f9 feature #9342 Add X-Debug-Url profiler url header (adrienbrault)
This PR was merged into the master branch.

Discussion
----------

Add X-Debug-Url profiler url header

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

Hey, working with rest APIs I find it way more convenient to have the profiler url directly in the header ... We human are used to deal with hypermedia!
A little bit of hateoas in symfony :)

Commits
-------

2f09754 Add X-Debug-Url profiler url header
2013-10-31 14:30:36 +01:00
Tobias Schultze
887f71c18c [Form] fix CsrfProviderAdapter 2013-10-31 14:22:03 +01:00
Fabien Potencier
f7692beec7 [HttpKernel] added missing use statement 2013-10-31 12:15:14 +01:00
Joseph Deray
b952bcbf9a fixed issue with clone now the children of the original form are preserved and the clone form is given new children 2013-10-30 18:44:30 -04:00
Adrien Brault
2f097540a8 Add X-Debug-Url profiler url header 2013-10-30 10:24:42 -07:00
Kevin Bond
2b8029e469 added content length header to BinaryFileResponse 2013-10-30 17:57:35 +01:00
Fabien Potencier
72f1b62ffb bumped Symfony version to 2.4.0 2013-10-30 16:13:28 +01:00
Fabien Potencier
b6310973d7 updated VERSION for 2.4.0-BETA2 2013-10-30 14:25:52 +01:00
Bernhard Schussek
4807c5effc [Form] Fixed failing FormDataExtractorTest 2013-10-30 13:42:39 +01:00
Bernhard Schussek
18113672c1 [Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput() 2013-10-30 13:27:00 +01:00
Fabien Potencier
23f12faa53 fixed CS 2013-10-30 09:33:58 +01:00
Fabien Potencier
9138e1a64c Merge branch '2.3'
* 2.3:
  fixed CS
  fixed CS
  [HttpKernel] fixed memory limit display in MemoryDataCollector
  Fixed the error handling when decoding invalid XML to avoid a Warning
  [Form] Fixed: The "data" option is taken into account even if it is NULL
  [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php
2013-10-30 09:31:46 +01:00
Fabien Potencier
61dd06ea27 fixed CS 2013-10-30 09:30:20 +01:00
Fabien Potencier
43f749e507 Merge branch '2.2' into 2.3
* 2.2:
  fixed CS
  Fixed the error handling when decoding invalid XML to avoid a Warning
  [Form] Fixed: The "data" option is taken into account even if it is NULL
  [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive

Conflicts:
	src/Symfony/Component/Form/Extension/Core/Type/FormType.php
2013-10-30 09:28:22 +01:00
Fabien Potencier
0211c387d3 fixed CS 2013-10-30 09:27:36 +01:00
Fabien Potencier
c2ca2e0242 minor #9389 [FrameworkBundle] Update deprecation message (asm89)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] Update deprecation message

Small addition to (doc string only):
https://github.com/symfony/symfony/pull/9252

Commits
-------

b057fab [FrameworkBundle] Update deprecation message
2013-10-29 17:17:07 +01:00
François Pluchino
19c74f3b1d Fix nonexistent key id in twig of data collector 2013-10-28 17:47:24 +01:00
Hugo Hamon
644f78d806 [HttpKernel] fixed memory limit display in MemoryDataCollector 2013-10-28 15:46:04 +01:00
Fabien Potencier
d866a5acc4 bug #9168 [FrameworkBundle] made sure that the debug event dispatcher is used everywhere (fabpot)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] made sure that the debug event dispatcher is used everywhere

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

The removal of the Profiler dependency on the TraceableEventDispatcher (#9170) allows to remerge the patch from #9068 that fixes #6686.

This PR also cleans up how profiles are stored. A Profile is now always stored only once.

The fix will only be available on 2.4+ as the changes are too deep to be backported to 2.2 and 2.3.

Commits
-------

1e1835e [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
2013-10-28 15:29:55 +01:00
Fabien Potencier
4bff07956a bug #9388 [Form] Fixed: The "data" option is taken into account even if it is NULL (bschussek)
This PR was merged into the 2.2 branch.

Discussion
----------

[Form] Fixed: The "data" option is taken into account even if it is NULL

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

Commits
-------

c1a3eb3 [Form] Fixed: The "data" option is taken into account even if it is NULL
2013-10-28 14:27:57 +01:00
Bernhard Schussek
99a4b7ebdd [Form] Fixed form debugger to work even when no view variables are logged (e.g. upon redirects) 2013-10-28 14:22:47 +01:00
Christophe Coevoet
b2550b90ae Fixed the error handling when decoding invalid XML to avoid a Warning 2013-10-28 13:20:44 +01:00
Alexander
b057fab170 [FrameworkBundle] Update deprecation message
Small addition to (doc string only):
https://github.com/symfony/symfony/pull/9252
2013-10-28 11:36:52 +01:00
Bernhard Schussek
c1a3eb3f2e [Form] Fixed: The "data" option is taken into account even if it is NULL 2013-10-28 10:50:26 +01:00
Fabien Potencier
a9c17c3266 feature #9365 prevent PHP from magically setting a 302 header (lsmith77)
This PR was merged into the master branch.

Discussion
----------

prevent PHP from magically setting a 302 header

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes (for people relying on getting a magic 302 when setting a Location header)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

this needs a test case .. but first let me know if you are ok with this change.
see http://www.php.net/manual/en/function.header.php

Commits
-------

c140d4f prevent PHP from magically setting a 302 header, see http://www.php.net/manual/en/function.header.php
2013-10-28 10:44:48 +01:00
Fabien Potencier
ca1cb27bcf feature #9252 [FrameworkBundle] Only enable CSRF protection when enabled in config (asm89)
This PR was squashed before being merged into the master branch (closes #9252).

Discussion
----------

[FrameworkBundle] Only enable CSRF protection when enabled in config

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | maybe?
| Deprecations? | no
| Tests pass?   | I hope, master was already broken here
| License       | MIT

bf85e8365a introduced new service configuration for CSRF protection in the frameworkbundle. It is always enabled even if you don't use it. Since it also depends on enabling the session that's not so nice.

Commits
-------

60dce14 [FrameworkBundle] Only enable CSRF protection when enabled in config
2013-10-28 10:42:32 +01:00
Alexander
60dce14228 [FrameworkBundle] Only enable CSRF protection when enabled in config 2013-10-28 10:42:32 +01:00
Lukas Kahwe Smith
c140d4feae prevent PHP from magically setting a 302 header, see http://www.php.net/manual/en/function.header.php 2013-10-27 08:50:44 +01:00
Fabien Potencier
6fcb06034a bug #9378 [DomCrawler] [HttpFoundation] Make Content-Type attributes identification case-insensitive (matthieuprat)
This PR was merged into the 2.2 branch.

Discussion
----------

[DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive

According to [section 3.7 of RFC 2616][], media-type attribute names in the `Content-Type` header are case-insensitive.
Therefore, identification of the `text` type and the `charset` parameter in the `Content-Type` header should be case-insensitive.

[section 3.7 of RFC 2616]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7

Commits
-------

17a2d66 [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
2013-10-26 10:02:56 +02:00
Fabien Potencier
a8acbf8fed Merge branch '2.3'
* 2.3:
  Fixed English usage for existing users.
  Clean up of WebProfiler Controller classes:
  [Process] Fix #9343 : revert file handle usage on Windows platform
2013-10-26 09:53:03 +02:00
Fabien Potencier
c1247a2054 Merge branch '2.2' into 2.3
* 2.2:
  Fixed English usage for existing users.
  [Process] Fix #9343 : revert file handle usage on Windows platform
2013-10-26 09:52:48 +02:00
Fabien Potencier
ed799c96af bug #9354 [2.2][Process] Fix #9343 : revert file handle usage on Windows platform (romainneutron)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Process] Fix #9343 : revert file handle usage on Windows platform

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

Hello,

I propose to revert the use of file handles only for `STDOUT` on Windows platform (see implementation in 2.2.6 [here](4059720232/src/Symfony/Component/Process/Process.php (L231-L242))).

When I decoupled pipes management from `Process` in #8924, I used file handles for both `STDOUT` and `STDERR`. This was an error as it introduced random failure in reading the handles (reported as [PHP#65650](https://bugs.php.net/bug.php?id=65650)).

Reverting to the previous implementation solves the issue. My apologies for the issues it introduced.

Versions that have been affected by the bug are 2.2.7, 2.2.8, 2.2.9, 2.3.4, 2.3.5 and 2.3.6.

Side note : I thought about testing the file handles implementation on *nix, but it fails most of the time where as Windows is okay. Unit testing on windows is okay (AbstractProcessTest::testProcessPipes tests it), but I don't provide a travis compatible test.

Commits
-------

e9dd408 [Process] Fix #9343 : revert file handle usage on Windows platform
2013-10-26 09:51:51 +02:00
Matthieu Prat
17a2d66456 [DomCrawler] [HttpFoundation] Make Content-Type attributes identification case-insensitive 2013-10-25 15:49:57 +00:00
Michael Genereux
95bca6cbf0 Fixed English usage for existing users. 2013-10-24 21:28:54 +02:00
caponica
9f4ca0818b Clean up of WebProfiler Controller classes:
Added missing "@throws" PHPdoc comments in controllers
Updated deprecated reference to Symfony\Component\HttpKernel\Debug\ExceptionHandler to use Symfony\Component\Debug\ExceptionHandler instead
2013-10-24 18:01:17 +02:00
Tobias Schultze
8513ac9a10 [Routing] added working test case for issue #5135 2013-10-24 15:23:46 +02:00
Abdul Malik Ikhsan
98bdb5fdec fixed typo 2013-10-23 15:18:42 +07:00
julien Galenski
4ccafa6396 Fix finder date constraints and tests 2013-10-22 16:32:10 +02:00
Romain Neutron
e9dd408881 [Process] Fix #9343 : revert file handle usage on Windows platform 2013-10-21 13:56:16 +02:00
Douglas Greenshields
edc287bc5b [Intl] make currency bundle merge fallback locales when accessing data, allowing use of country-specific locales 2013-10-20 17:06:39 +01:00
bobdenotter
b6738b60e3 Set the font-weight for links to 'normal', to prevent ugly bold links. 2013-10-19 19:10:54 +02:00
Fabien Potencier
1206176fc4 Merge branch '2.3'
* 2.3:
  [DoctrineBridge] Added type check to prevent calling clear() on arrays
  [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
  Fix docblock typo
2013-10-18 17:01:47 +02:00
Fabien Potencier
f2c6211306 bug #9335 [2.4][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty (bschussek)
This PR was merged into the master branch.

Discussion
----------

[2.4][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty

#9333 merged into master.

Commits
-------

9a8ec64 Merge branch 'fix-csrf-default-2.3' into fix-csrf-default-2.4
baa2356 [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
408769e bug #9328 [2.3][Form] Changed FormTypeCsrfExtension to use the form's name as default intention (bschussek)
2013-10-18 17:01:02 +02:00
Fabien Potencier
60a14f6ffe Merge branch '2.2' into 2.3
* 2.2:
  [DoctrineBridge] Added type check to prevent calling clear() on arrays
  [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
  Fix docblock typo

Conflicts:
	src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php
2013-10-18 17:00:23 +02:00
Fabien Potencier
2a637b12b4 bug #9333 [2.2][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty (bschussek)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty

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

ping @stof

follow-up PR to #9327

Commits
-------

219e44d [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
2013-10-18 16:57:55 +02:00
Bernhard Schussek
4ff59d77a8 [DoctrineBridge] Added type check to prevent calling clear() on arrays 2013-10-18 16:04:39 +02:00
Bernhard Schussek
9a8ec64338 Merge branch 'fix-csrf-default-2.3' into fix-csrf-default-2.4
Conflicts:
	src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php
2013-10-18 13:14:20 +02:00
Bernhard Schussek
baa2356859 [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty 2013-10-18 13:11:42 +02:00
Bernhard Schussek
219e44d610 [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty 2013-10-18 13:07:56 +02:00
Wouter J
2b0b355544 Fixed XML dump 2013-10-18 11:29:21 +02:00
Fabien Potencier
bae30242cb minor #9311 [Csrf] component fixes (Tobion)
This PR was squashed before being merged into the master branch (closes #9311).

Discussion
----------

[Csrf] component fixes

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

- [Csrf] fixed some phpdocs
- [Csrf] fixed return types (also https://github.com/symfony/symfony/pull/9216#discussion_r6797190 )
- [Csrf] fixed test class namespaces

Commits
-------

d7eb8ff [Csrf] component fixes
2013-10-17 23:29:17 +02:00
Tobias Schultze
d7eb8ff64a [Csrf] component fixes 2013-10-17 23:29:16 +02:00
Adrien Brault
fd869cf295 Fix docblock typo 2013-10-17 23:27:38 +02:00
Bernhard Schussek
6400bd1d0f Merge branch 'fix-csrf-default-2.3' into fix-csrf-default-2.4
Conflicts:
	src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php
2013-10-17 18:05:02 +02:00
Bernhard Schussek
c4abe83e9b Merge branch 'fix-csrf-default-2.2' into fix-csrf-default-2.3
Conflicts:
	src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php
2013-10-17 18:01:33 +02:00
Bernhard Schussek
b07c618bf4 [Form] Changed FormTypeCsrfExtension to use the form's name as default intention 2013-10-17 17:52:50 +02:00
Fabien Potencier
34103c1d7a Merge branch '2.3'
* 2.3:
  Improve documentation of X-Forwarded-For header handling
  [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
  Removed unused use statements.
  Make usleep longer and simplify assertions
  Added japanese translation resource for security component.
  Replaced the @inheritdoc with an actual list of params since the original method has a different signature.
  fix typo : StdClass should be stdClass with little "s"
  Remove unnecessary continue from Request
  [Yaml] Fixed the escaping of strings starting with a dash when dumping
  Fix in ChainLoader.php
  fixed wrong started states
2013-10-17 13:48:11 +02:00
Fabien Potencier
8e21cac9e1 Merge branch '2.2' into 2.3
* 2.2:
  [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
  Removed unused use statements.
  Make usleep longer and simplify assertions
  Added japanese translation resource for security component.
  [Yaml] Fixed the escaping of strings starting with a dash when dumping
  Fix in ChainLoader.php
  fixed wrong started states
2013-10-17 13:48:01 +02:00
Bernhard Schussek
f21de874fc [WebProfilerBundle] Fixed invalid condition in form panel 2013-10-17 13:05:00 +02:00
Fabien Potencier
4c164ca0ca Revert "minor #9269 [Console] make InputArgument::setDefault() chainable (pscheit)"
This reverts commit ab7bf648cc, reversing
changes made to 5b6ef23196.
2013-10-16 18:16:10 +02:00
Fabien Potencier
514fabd01d Revert "fixed CS"
This reverts commit 39c9c1266e.
2013-10-16 18:16:05 +02:00
Samuel Vogel
0d232ba2f2 Improve documentation of X-Forwarded-For header handling 2013-10-16 17:16:00 +02:00
Fabien Potencier
39c9c1266e fixed CS 2013-10-16 16:56:32 +02:00
Fabien Potencier
ab7bf648cc minor #9269 [Console] make InputArgument::setDefault() chainable (pscheit)
This PR was merged into the master branch.

Discussion
----------

[Console] make InputArgument::setDefault() chainable

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

To allow chaining of methods, setDefault should return the InputArgument. I'm not quite sure if you would tread this as a BC break?

best regards
Philipp

Commits
-------

7b7a4c1 [Console] make InputArgument::setDefault() chainable
2013-10-16 16:56:21 +02:00
Fabien Potencier
0080399b7d bug #9308 [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays (bschussek)
This PR was merged into the 2.2 branch.

Discussion
----------

[DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays

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

Previously, writing an association getter like this was impossible:

```php
public function addTag(Tag $tag) { ... }
public function removeTag(Tag $tag) { ... }

public function getTags()
{
    return $this->tags->toArray();
}
```

Using `toArray()` is a useful way to restrict modifications of the collection to the specified methods. But previously, CollectionToArrayTransformer failed in this case, because it did not accept arrays as input.

Commits
-------

55001ab [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
2013-10-16 16:55:16 +02:00
Fabien Potencier
5b6ef23196 bug #9297 [Form] Add missing use in form renderer (egeloen)
This PR was merged into the master branch.

Discussion
----------

[Form] Add missing use in form renderer

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

Commits
-------

7686867 [Form] Add missing use in form renderer
2013-10-16 16:53:26 +02:00
Fabien Potencier
64b9381002 minor #9305 Removed dead code (unused use statements). (hhamon)
This PR was merged into the master branch.

Discussion
----------

Removed dead code (unused use statements).

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

Commits
-------

eced94b Removed dead code (unused use statements).
2013-10-16 16:52:55 +02:00
François Pluchino
d3079ee559 Fix unresolved class 2013-10-16 16:40:12 +02:00
Bernhard Schussek
55001abd1a [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays 2013-10-16 16:40:09 +02:00
Hugo Hamon
0946be6c5b Removed unused use statements. 2013-10-16 14:19:20 +02:00
Hugo Hamon
eced94b7b9 Removed dead code (unused use statements). 2013-10-16 13:59:56 +02:00
Eric GELOEN
7686867b2c [Form] Add missing use in form renderer 2013-10-15 22:21:24 +02:00
Brikou Carré
beae3b1a8b Make usleep longer and simplify assertions 2013-10-15 18:59:35 +02:00
hidenorigoto
26e50fff97 Added japanese translation resource for security component. 2013-10-15 18:57:17 +02:00
Jakub Zalas
bb8930c4da Replaced the @inheritdoc with an actual list of params since the original method has a different signature.
Also, fixed indentation in other docblocks.
2013-10-15 11:16:18 +01:00
Abdul Malik Ikhsan
6892779d0b fix typo : StdClass should be stdClass with little "s" 2013-10-13 08:32:10 +02:00
Gábor Tóth
304c7b6f87 Remove unnecessary continue from Request 2013-10-11 13:59:44 +02:00
Tobias Schultze
5798029450 [Console] improve regex performance to validate name
using possesive quantifier
2013-10-11 13:57:48 +02:00
Tobias Schultze
22b09cea94 [Console] make parent constructor test more reliable
it also fixes the test since f2b60e9c68 and improves phpdoc
2013-10-11 13:57:47 +02:00
Christophe Coevoet
af369aee64 [Yaml] Fixed the escaping of strings starting with a dash when dumping
Dashes need to be escaped in character sets in regexes as they are used to
specify a range otherwise.
Refs #9039
2013-10-11 00:23:27 +02:00
janschoenherr
e2ecc0fd23 Fix in ChainLoader.php
The LoaderInterface requires the time to be passed.
2013-10-10 17:51:38 +02:00
Thomas Adam
e8d3ab22b4 fixed wrong started states 2013-10-10 17:50:52 +02:00
Fabien Potencier
7b2fd0bdce Merge branch '2.3'
* 2.3:
  bumped Symfony version to 2.3.7
  updated VERSION for 2.3.6
  updated CHANGELOG for 2.3.6
  bumped Symfony version to 2.2.10
  updated VERSION for 2.2.9
  update CONTRIBUTORS for 2.2.9
  updated CHANGELOG for 2.2.9
  [Security] limited the password length passed to encoders
  [HttpKernel] Fixed a test (compiler pass class name has been changed).
  assets:install command should mirror .dotfiles (.htaccess)
  PoFileDumper - PO headers
  removed whitespaces

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php
	src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
	src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
	src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php
	src/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php
	src/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.php
	src/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.php
	src/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php
2013-10-10 16:19:44 +02:00
Fabien Potencier
f3bd125aed bumped Symfony version to 2.3.7 2013-10-10 16:16:40 +02:00
Fabien Potencier
d0597156c4 updated VERSION for 2.3.6 2013-10-10 15:24:22 +02:00
Fabien Potencier
e7df974ab8 Merge branch '2.2' into 2.3
* 2.2:
  bumped Symfony version to 2.2.10
  updated VERSION for 2.2.9
  update CONTRIBUTORS for 2.2.9
  updated CHANGELOG for 2.2.9
  [Security] limited the password length passed to encoders
  assets:install command should mirror .dotfiles (.htaccess)
  PoFileDumper - PO headers
  removed whitespaces

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php
2013-10-10 15:12:30 +02:00
Fabien Potencier
2996c6b4c6 bumped Symfony version to 2.2.10 2013-10-10 15:10:05 +02:00
Fabien Potencier
6a5c6c0d76 updated VERSION for 2.2.9 2013-10-10 14:15:43 +02:00
Fabien Potencier
67d4a8f8af [Security] limited the password length passed to encoders 2013-10-10 14:05:52 +02:00
Philipp Scheit
7b7a4c11a7 [Console] make InputArgument::setDefault() chainable 2013-10-10 13:29:02 +02:00
Jakub Zalas
e01461df62 [HttpKernel] Fixed a test (compiler pass class name has been changed). 2013-10-10 08:15:46 +02:00
Fabien Potencier
86f646fca6 fixed a test 2013-10-10 08:05:49 +02:00
Fabien Potencier
02791be0e6 Revert "fixed a test"
This reverts commit 8bee6883b6.
2013-10-10 08:05:16 +02:00
Fabien Potencier
94a9296341 bug #9234 [Debug] Fixed ClassNotFoundFatalErrorHandler (tPl0ch)
This PR was merged into the master branch.

Discussion
----------

[Debug] Fixed `ClassNotFoundFatalErrorHandler`

After running the test suite, this produced a Fatal Error. Having continue in a child method is not allowed.

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

Commits
-------

ecee5c2 [Debug] Fixed `ClassNotFoundFatalErrorHandler`
2013-10-10 07:59:07 +02:00
Fabien Potencier
71412d7998 minor #9260 [HttpKernel] Fixed a test (compiler pass class name has been changed) (jakzal)
This PR was merged into the master branch.

Discussion
----------

[HttpKernel] Fixed a test (compiler pass class name has been changed)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes, if #9259 also gets merged
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

**I've sent it against wrong branch. It should be merged in 2.3. Sorry.**

Commits
-------

fae01c1 [HttpKernel] Fixed a test (compiler pass class name has been changed).
2013-10-10 07:54:06 +02:00
Fabien Potencier
744fd0d5f5 Merge branch '2.3'
* 2.3:
  [Process] Fix latest merge from 2.2 in 2.3
2013-10-10 07:53:18 +02:00
Thomas Ploch
ecee5c2e92 [Debug] Fixed ClassNotFoundFatalErrorHandler 2013-10-10 01:10:59 +02:00
Jakub Zalas
fae01c10d0 [HttpKernel] Fixed a test (compiler pass class name has been changed). 2013-10-09 22:38:23 +01:00
Romain Neutron
b5e3576ea0 [Process] Fix latest merge from 2.2 in 2.3 2013-10-09 23:17:57 +02:00
Andrew Moore
6f48f8e231 assets:install command should mirror .dotfiles (.htaccess) 2013-10-09 23:05:14 +02:00
Adam Prager
a8bc8fff74 PoFileDumper - PO headers 2013-10-09 22:59:37 +02:00
Fabien Potencier
773932b64b removed whitespaces 2013-10-09 22:52:58 +02:00
Fabien Potencier
ad7ac02ee4 Merge branch '2.3'
* 2.3:
  [Process] Fix #9182 : random failure on pipes tests
  Fixed propel guessed relations
  [FramworkBundle][HttpKernel] Check event listener services are not abstract
  fixed CS
  Check for lock existence before unlinking
  remove MinCount and MaxCount contraints. It has been replaced by Count constraints.
  [FrameworkBundle] fixed path replacement on Windows

Conflicts:
	src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php
2013-10-09 22:52:22 +02:00
Fabien Potencier
77a961d040 Merge branch '2.2' into 2.3
* 2.2:
  [Process] Fix #9182 : random failure on pipes tests
  Fixed propel guessed relations
  [FramworkBundle][HttpKernel] Check event listener services are not abstract
  fixed CS
  Check for lock existence before unlinking
  [FrameworkBundle] fixed path replacement on Windows

Conflicts:
	src/Symfony/Component/Process/Process.php
2013-10-09 22:51:36 +02:00
Romain Neutron
64a0b40e6f [Process] Fix #9182 : random failure on pipes tests 2013-10-09 18:53:02 +02:00
Fabien Potencier
8bee6883b6 fixed a test 2013-10-09 09:29:29 +02:00
Fabien Potencier
b00289a6d0 bug #9236 [Form] fix missing use statement for exception UnexpectedTypeException (jaugustin)
This PR was merged into the master branch.

Discussion
----------

[Form] fix missing use statement for exception UnexpectedTypeException

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

fix missing use statement for exception `Symfony\Component\Form\Exception\UnexpectedTypeException`

cc @bschussek

Commits
-------

ea91533 [form] fix missing use statement for exception UnexpectedTypeException
2013-10-08 10:34:28 +02:00
Fabien Potencier
f2b60e9c68 [Console] changed an exception class 2013-10-08 08:39:58 +02:00
Fabien Potencier
5bed1cd6d2 bumped Symfony version to 2.4.0 2013-10-08 08:33:45 +02:00
Jérémie Augustin
ea915334e1 [form] fix missing use statement for exception UnexpectedTypeException 2013-10-07 19:12:10 +02:00
Fabien Potencier
911b328dc1 bug #9216 [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator (bschussek)
This PR was merged into the master branch.

Discussion
----------

[Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator

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

This is a follow-up PR of #6554 that splits the CsrfTokenGenerator into two separate classes for generating and managing CSRF tokens. As a consequence, it is now possible to explicitly remove or refresh CSRF tokens if they should be used only once. See #9210 for more information.

Commits
-------

d4bb5f4 [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator
2013-10-07 15:08:26 +02:00
Bernhard Schussek
d4bb5f4e3c [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator 2013-10-07 14:50:43 +02:00
Fabien Potencier
4f19105604 updated VERSION for 2.4.0-BETA1 2013-10-07 12:36:58 +02:00
Fabien Potencier
937d908c43 fixed test side effects 2013-10-07 12:30:10 +02:00
Clément Gautier
0b1e95f84c Fixed propel guessed relations 2013-10-06 13:10:32 +02:00
Grégoire Pineau
cabb1fa8bb [FrameworkBundle] Adds the possibility to register Commands via the DIC 2013-10-04 16:09:28 +02:00
Grégoire Pineau
6744ead017 [FramworkBundle][HttpKernel] Check event listener services are not abstract 2013-10-04 15:20:41 +02:00
Fabien Potencier
678e1de289 skipped some tests on PHP 5.3 2013-10-04 15:17:50 +02:00
Fabien Potencier
e18bd76dd8 [ExpressionLanguage] fixed typo 2013-10-04 11:41:51 +02:00
Fabien Potencier
86ef58c771 fixed some tests 2013-10-04 11:41:28 +02:00
Fabien Potencier
600f3bb5db [Console] fixed tests 2013-10-04 11:08:13 +02:00
Fabien Potencier
6fce9d8391 fixed CS 2013-10-04 10:27:42 +02:00
Ollie Harridge
8fc64439ca Check for lock existence before unlinking
My logs are filled with a bazillion errors stating "Warning: unlink(/var/www/mysite/app/cache/prod/http_cache/md/cf/47/c693da5dab3eccb65fa36a9b4b07ad0f7cc4.lck): No such file or directory in /var/www/mysite/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 53"
2013-10-04 10:27:20 +02:00
Bernhard Schussek
5329ab5d5f [Form] Fixed memory leak in FormValidator 2013-10-04 09:21:40 +02:00
Eric GELOEN
a386c74153 [Form] Add a 'submitted' attribute to the form view 2013-10-04 00:18:53 +02:00
Fabien Potencier
2d983b5caf removed obsolete code 2013-10-03 09:18:41 +02:00
Fabien Potencier
4c2d2e287a [ExpressionLanguage] replaced the =~ operator by matches (removed the != operator) 2013-10-02 20:16:09 +02:00
Fabien Potencier
96fb922e67 bug #9197 [FrameworkBundle] updated XML route description (jfsimon)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] updated XML route description

This PR turns

```xml
<route name="route_1" path="/hello/{name}" class="Symfony\Component\Routing\Route" path_regex="#^/hello(?:/(?P&lt;name&gt;[a-z]+))?$#s">
```

into

```xml
<route name="route_1" class="Symfony\Component\Routing\Route">
    <path regex="#^/hello(?:/(?P&lt;name&gt;[a-z]+))?$#s">/hello/{name}</path>
```

in XML routing description.

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

Commits
-------

7b99ede [FrameworkBundle] updated XML route description
2013-10-02 16:57:54 +02:00
Fabien Potencier
fe5961a6cd [FrameworkBundle] moved router:debug and container:debug to use the compact layout 2013-10-02 16:43:14 +02:00
Fabien Potencier
bd16157e98 [FrameworkBundle] changed JSON descriptors to be more readable on PHP 5.4+ 2013-10-02 16:42:10 +02:00
Fabien Potencier
1d210f86a6 [FrameworkBundle] changed the router:debug to use the shortcut notation for the controller 2013-10-02 16:42:09 +02:00
Fabien Potencier
d997dfa556 [FrameworkBundle] fixed container:debug and router:debug commands 2013-10-02 16:42:09 +02:00
Fabien Potencier
a878e68266 bug #9184 Fixed cache warmup of paths which contain back-slashes (fabpot)
This PR was merged into the 2.2 branch.

Discussion
----------

Fixed cache warmup of paths which contain back-slashes

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

From #8781

"
At this step in the warmup process there is a string replacement made, but paths with backslashes
are written into the cache file as something like `C:\\path\\to\\cache/pro_/...` but the str_replace
searches for the plain string `C:\path\to\cache/pro_/...`, which produces no matches.

The fix solves this by using var_export to escape the search (and replace) paths so they match the
format originally output into the cache file.
"

Commits
-------

526d285 [FrameworkBundle] fixed path replacement on Windows
2013-10-02 12:55:44 +02:00
Fabien Potencier
da9bee08e4 [Console] added a compact layout for the table helper 2013-10-02 09:34:37 +02:00
Fabien Potencier
e9ea73311f [Console] added an exception when the padding char is empty to avoid a PHP error in the table helper 2013-10-02 09:34:00 +02:00
Jean-François Simon
7b99ede0dc [FrameworkBundle] updated XML route description 2013-10-02 09:30:07 +02:00
Fabien Potencier
04d767db56 fixed CS 2013-10-01 19:34:40 +02:00
Fabien Potencier
e47677edd5 minor #8487 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper (saro0h)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no

Commits
-------

31c6c62 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper
2013-10-01 19:32:30 +02:00
Fabien Potencier
8840591b25 Merge branch '2.2' into 2.3
* 2.2:
  remove MinCount and MaxCount contraints. It has been replaced by Count constraints.
2013-10-01 19:10:09 +02:00
franek
58a3296e36 remove MinCount and MaxCount contraints. It has been replaced by Count constraints. 2013-10-01 16:29:34 +02:00
Fabien Potencier
f8f8816e4b Merge branch '2.3'
* 2.3:
  Fix: duplicate usage of Symfony\Component\HttpFoundation\Response
  [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
  Revert "merged branch Tobion/flattenexception (PR #9111)"
  [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied

Conflicts:
	src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
2013-10-01 16:17:10 +02:00
Fabien Potencier
82f6a62bb3 Merge branch '2.2' into 2.3
* 2.2:
  Fix: duplicate usage of Symfony\Component\HttpFoundation\Response
2013-10-01 16:16:42 +02:00
simpson
70cbfc3180 Fix: duplicate usage of Symfony\Component\HttpFoundation\Response 2013-10-01 16:15:07 +02:00
Fabien Potencier
31fb8c7cc3 feature #7887 [FrameworkBundle] adds routing/container descriptors (jfsimon)
This PR was squashed before being merged into the master branch (closes #7887).

Discussion
----------

[FrameworkBundle] adds routing/container descriptors

The goal of this PR is to add descriptors (as in #7454) for routing and container. This will permit add a `--format` option to `router:debug` and `container:debug` commands (with `txt`, `json`, `xml` and `md` formats).

Commits
-------

22f9bc8 [FrameworkBundle] adds routing/container descriptors
2013-10-01 16:13:14 +02:00
Jean-François Simon
22f9bc887e [FrameworkBundle] adds routing/container descriptors 2013-10-01 16:13:13 +02:00
Fabien Potencier
47d080dbd6 feature #8835 [Console] Fixed verbose option when passing verbosity level as option value (deguif)
This PR was squashed before being merged into the master branch (closes #8835).

Discussion
----------

[Console] Fixed verbose option when passing verbosity level as option value

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

Currently passing a verbosity level to verbose option on console doesn't work unless using the shotcuts _-v_, _-vv_, _-vvv_.

This also fix _accept_value_ in the xml generated by __console help --xml__ for people using the xml output ;)

Commits
-------

a28eb8b [Console] Fixed verbose option when passing verbosity level as option value
2013-10-01 15:40:57 +02:00
François-Xavier de Guillebon
a28eb8b561 [Console] Fixed verbose option when passing verbosity level as option value 2013-10-01 15:34:25 +02:00
franek
f232550225 remove deprecated constraints calls (Min, Max, MaxLength, MinLength) 2013-10-01 14:55:47 +02:00
Fabien Potencier
b0687c8d81 Merge branch '2.2' into 2.3
* 2.2:
  [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
  [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
2013-10-01 14:47:27 +02:00
Fabien Potencier
abb765f135 minor #8927 [Templating] fix logic regarding template references and many phpdocs (Tobion)
This PR was squashed before being merged into the master branch (closes #8927).

Discussion
----------

[Templating] fix logic regarding template references and many phpdocs

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

this clarifies the expected types and exceptions by much. and it fixes some logic flaws.
- missing info/methods in interfaces
- respecting Twig_LoaderInterface only accepting strings, not objects

related to fabpot/Twig#1183 but does not depend on it

Commits
-------

f6c12bd [Templating] fix logic regarding template references and many phpdocs
2013-10-01 14:37:06 +02:00
Tobias Schultze
f6c12bd6de [Templating] fix logic regarding template references and many phpdocs 2013-10-01 14:37:05 +02:00
franek
89a040434e [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3) 2013-10-01 14:21:02 +02:00
Grégoire Pineau
7e5c9011c9 [Console] Throw an exception if the command does not contain aliases
It can only happend if the constructor has been overridden
2013-10-01 12:29:09 +02:00
Fabien Potencier
526d2858f2 [FrameworkBundle] fixed path replacement on Windows
In the cache, blackslashes in paths can be both represented by a single
or a double backslash.
2013-10-01 11:24:08 +02:00
Fabien Potencier
554d57b399 bug#9146 [RC][Form] Let null values clear fields in PATCH requests (alex88)
This PR was merged into the master branch.

Discussion
----------

[RC][Form] Let null values clear fields in PATCH requests

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes

I've changed the way form checks wherever or not to submit childs by checking submitted data with array_key_exists and not with just isset.

This way in PATCH requests values are not processed when they are not in array and not also when the value is null. Currently there is no way to null a value with a PATCH request, even passing it null.

This can lead to some BC breaks depending on how users used form in their code.

Commits
-------

f5812c5 [Form] Let null values to unset fields in PATCH requests
2013-10-01 10:38:18 +02:00
Fabien Potencier
112fa5eeed feature#8637 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled (pylebecq)
This PR was squashed before being merged into the master branch (closes #8637).

Discussion
----------

[DomCrawler] Allowed internal validation of ChoiceFormField to be disabled

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

Hi,

Here is a quite basic attempt to be able to disable the internal validation of the ChoiceFormField. It's pretty basic.
Feel free to tell me what you think guys. Maybe I should check the `validationDisabled` property at the beginning of the `containsOption()` method ?
I'll make the documentation PR as soon as the implementation will be validated.

Regards.

Commits
-------

739bf71 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled
2013-10-01 10:36:55 +02:00
Pierre-Yves LEBECQ
739bf715c7 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled 2013-10-01 10:36:54 +02:00
Alessandro Tagliapietra
f5812c5e40 [Form] Let null values to unset fields in PATCH requests 2013-10-01 10:31:32 +02:00
Bernhard Schussek
7c7d86e369 [Security] Fixed test cases of the Csrf sub-component 2013-10-01 10:18:52 +02:00
Fabien Potencier
2cd6e002c7 feature#8957 [HttpFoundation] added a way to override the Request class (fabpot)
This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] added a way to override the Request class

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7461, #7453
| License       | MIT
| Doc PR        | symfony/symfony-docs#3021

This is an alternative implementation for #7461.

I've also reverted #7381 and #7390 as these changes are not needed anymore.

Todo:

 - [ ] add some tests

Commits
-------

464439d [HttpFoundation] added a way to override the Request class
2013-10-01 07:05:57 +02:00
Fabien Potencier
464439d195 [HttpFoundation] added a way to override the Request class 2013-09-30 22:35:02 +02:00
Fabien Potencier
d80e840b7f [Console] added some tests for previous merge (refs #8626) 2013-09-30 21:59:36 +02:00
Christian Flothmann
81aead238b pass command name automatically if required by the application 2013-09-30 21:44:35 +02:00
Adrien Brault
38f02eacbf [HttpFoundation] Add a way to avoid the session be written at each request 2013-09-30 12:03:12 -07:00
Fabien Potencier
c886612c99 fixed some unit tests 2013-09-30 19:16:09 +02:00
Fabien Potencier
1e1835ef59 [FrameworkBundle] made sure that the debug event dispatcher is used everywhere 2013-09-30 17:51:41 +02:00
Fabien Potencier
c741c5838d fixed typos 2013-09-30 17:49:53 +02:00
Fabien Potencier
bdcdc6eddb feature#9170 Decoupled TraceableEventDispatcher from the Profiler (fabpot)
This PR was merged into the master branch.

Discussion
----------

Decoupled TraceableEventDispatcher from the Profiler

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

This PR removes the Profiler dependency on the TraceableEventDispatcher. That makes things more decoupled and cleaner. This PR also cleans up how profiles are stored; a Profile is now always stored only once.

I've created a `LateDataCollectorInterface` that is implemented for data collector that needs to get information from data that are available very late in the request process (when the request and the response are not even available anymore). The `lateCollect()` method is called just before the profile is stored.

We have 3 data collectors that implement that interface:

 * Time: As the traceable event dipsatcher gets inject timing information via the stopwatch about all events (including the `terminate` one), we need to get events from the stopwatch as late as possible.
 * Event: The traceable event dispatcher gathers all called listeners to determine non-called ones. To be able to accurately do that for all events (including the `terminate` one), we need to get the data as late as possible.
 * Memory: We want to get the memory as late as possible to get the most accurate number as possible

I'm not very happy with the name and as always, better suggestions would be much appreciated.

This is an extract from #9168

Commits
-------

5cedea2 [HttpKernel] added LateDataCollectorInterface
9c4bc9a [HttpKernel] decoupled TraceableEventDispatcher and Profiler
2013-09-30 17:42:20 +02:00
Fabien Potencier
0f80916313 feature#6554 [Security] Added Security\Csrf sub-component with better token generation (bschussek)
This PR was merged into the master branch.

Discussion
----------

[Security] Added Security\Csrf sub-component with better token generation

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

**Update September 27, 2013**

This PR simplifies the CSRF mechanism to generate completely random tokens. A random token is generated once per ~~intention~~ token ID and then stored in the session. Tokens are valid until the session expires.

Since the CSRF token generator depends on `StringUtils` and `SecureRandom` from Security\Core, and since Security\Http currently depends on the Form component for token generation, I decided to add a new Security\Csrf sub-component that contains the improved CSRF token generator. Consequences:

* Security\Http now depends on Security\Csrf instead of Form
* Form now optionally depends on Security\Csrf
* The configuration for the "security.secure_random" service and the "security.csrf.*" services was moved to FrameworkBundle to guarantee BC

In the new Security\Csrf sub-component, I tried to improve the naming where I could do so without breaking BC:

* CSRF "providers" are now called "token generators"
* CSRF "intentions" are now called "token IDs", because that's really what they are

##### TODO

- [ ] The documentation needs to be checked for references to the configuration of the application secret. Remarks that the secret is used for CSRF protection need to be removed.
- [ ] Add aliases "csrf_token_generator" and "csrf_token_id" for "csrf_provider" and "intention" in the SecurityBundle configuration
- [x] Make sure `SecureRandom` never blocks for `CsrfTokenGenerator`

Commits
-------

7f02304 [Security] Added missing PHPDoc tag
2e04e32 Updated Composer dependencies to require the Security\Csrf component where necessary
bf85e83 [FrameworkBundle][SecurityBundle] Added service configuration for the new Security CSRF sub-component
2048cf6 [Form] Deprecated the CSRF implementation and added an optional dependency to the Security CSRF sub-component instead
85d4959 [Security] Changed Security HTTP sub-component to depend on CSRF sub-component instead of Form
1bf1640 [Security] Added CSRF sub-component
2013-09-30 17:35:08 +02:00
Fabien Potencier
164c1cbfec feature#9171 [Form] Rewrite boolean attributes to match HTML spec (bschussek)
This PR was merged into the master branch.

Discussion
----------

[Form] Rewrite boolean attributes to match HTML spec

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

Same as #7856

> 'The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.' - http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#boolean-attribute

This commit modifies widget_container_attributes and widget_attributes so that:

* `true` values render as the attribute name with the attribute name repeated as the value
* `false` values are not rendered

The comparison is strict using sames() in twig.

Previously `false` values would have been rendered as `some-attribute=""` which according to the spec would actually make them a boolean attribute and therefore equal to true.

Commits
-------

b85577b [Form] Improved test coverage of widget_attributes and widget_container_attributes blocks
8e4c2a7 [Form] Rewrite boolean attributes to match HTML spec
2013-09-30 15:57:18 +02:00
Bernhard Schussek
7f02304654 [Security] Added missing PHPDoc tag 2013-09-30 15:41:48 +02:00
Bernhard Schussek
2e04e32c8f Updated Composer dependencies to require the Security\Csrf component where necessary 2013-09-30 14:39:06 +02:00
Bernhard Schussek
b85577bb96 [Form] Improved test coverage of widget_attributes and widget_container_attributes blocks 2013-09-30 14:32:22 +02:00
Leevi Graham
8e4c2a7e65 [Form] Rewrite boolean attributes to match HTML spec
'The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.'

- http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#boolean-attribute
2013-09-30 14:07:49 +02:00
Fabien Potencier
e281d7748e bug#8809 [Form] enforce correct timezone (Burgov)
This PR was merged into the 2.2 branch.

Discussion
----------

[Form] enforce correct timezone

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | not sure if this is a BC break...
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I'm using the Form component to handle JSON requests which come from AJAX requests. The JSON is formed by the Angular toJson method

A typical request would be:
```
{
  name: "Some name"
  start: "2013-08-21T05:00:00.000Z"
  end: "2013-08-21T15:00:00.000Z"
}
```

Note that in this case, what I entered in my input boxes are 7:00 for start and 17:00 for end times. As you can see, Angular (or Chrome, I'm not sure), converts this to the "Z" timezone. Since I cannot enforce the correct timezone client side, the timezone will differ from the one configured in the DateTimeType, however, instead of resulting in either an error or a conversion to the correct timezone, I get a datetime object in the wrong timezone, eventually resulting in wrong values in the database.

By checking the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied, this problem is solved.

Commits
-------

b0349a1 [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
2013-09-30 12:22:54 +02:00
Fabien Potencier
e0d3573454 Revert "merged branch Tobion/flattenexception (PR #9111)"
This reverts commit 53b2048c4c, reversing
changes made to c60a8e962b.
2013-09-30 11:54:26 +02:00
Fabien Potencier
5cedea2c07 [HttpKernel] added LateDataCollectorInterface 2013-09-30 10:54:48 +02:00
Fabien Potencier
9c4bc9a0ed [HttpKernel] decoupled TraceableEventDispatcher and Profiler 2013-09-30 10:52:26 +02:00
Fabien Potencier
59409b47c8 fixed wrong merge 2013-09-29 21:54:28 +02:00
Fabien Potencier
d10dec9bf3 Merge branch '2.3'
* 2.3:
  fixed Client when using the terminable event
  Fix problem with Windows file links (backslash in JavaScript string)
  [Security] fixed wrong phpdoc
  [DependencyInjection] Prevented inlining of lazy loaded private service definitions.
  [Routing] removed extra argument
  [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
  Added doc comments

Conflicts:
	src/Symfony/Component/Routing/Router.php
	src/Symfony/Component/Security/Http/Firewall.php
2013-09-29 21:43:28 +02:00
Fabien Potencier
bc256f9da4 Merge branch '2.2' into 2.3
* 2.2:
  fixed Client when using the terminable event
  Fix problem with Windows file links (backslash in JavaScript string)
  [Security] fixed wrong phpdoc
  [Routing] removed extra argument
  [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
  Added doc comments

Conflicts:
	src/Symfony/Component/HttpFoundation/Request.php
2013-09-29 21:41:41 +02:00
Fabien Potencier
8c8cf62038 fixed Client when using the terminable event 2013-09-29 21:31:28 +02:00
Fabien Potencier
44b890ee68 fixed a typo 2013-09-29 20:27:12 +02:00
Fabien Potencier
e26ae45a42 [HttpKernel] added missing argument to listener call 2013-09-29 16:28:25 +02:00
Thomas Schulz
5e2ac93f98 Fix problem with Windows file links (backslash in JavaScript string) 2013-09-27 23:42:26 +02:00
Fabien Potencier
a38318b218 bug#9153 [DependencyInjection] Prevented inlining of lazy loaded private service definitions (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Prevented inlining of lazy loaded private service definitions

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

Commits
-------

bb0125b [DependencyInjection] Prevented inlining of lazy loaded private service definitions.
2013-09-27 21:46:26 +02:00
Fabien Potencier
27cc10c660 [Security] fixed wrong phpdoc 2013-09-27 18:31:48 +02:00
Fabien Potencier
331043f421 feature#9150 [Filesystem] introduced new Exception base classes (fabpot)
This PR was merged into the master branch.

Discussion
----------

[Filesystem] introduced new Exception base classes

The Filesystem class now throws a ```FileNotFoundException``` if a file could not be found, rather than an basic ```IOException```. The new exception is still a child of the ```IOException```, this way it doesn' t breack BC.
The ```IOException``` now also takes as the first argument an path to the file of interest, which can be used via the ```getPath()``` method.

The switch to the FilesystemInterface will allow you to have an implementation accessing S3 or Dropbox, etc. and still inject it into a classes, which are requiring the Filesystem.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| Doc PR        | symfony/symfony-docs#2947

Commits
-------

c2e43d0 [Filesystem] removed getPath() on Exceptions and cleaned up CS and error messages
785080a [Filesystem] introduced new Exception base classes
2013-09-27 18:26:45 +02:00
Fabien Potencier
a86b35fd7f feature#9151 [HttpKernel] made the cache key generation configurable for the default HttpCache store (fabpot)
This PR was merged into the master branch.

Discussion
----------

[HttpKernel] made the cache key generation configurable for the default HttpCache store

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

Commits
-------

780b77a [HttpKernel] made the cache key generation configurable for the default HttpCache store
2013-09-27 18:24:27 +02:00
Fabien Potencier
780b77af58 [HttpKernel] made the cache key generation configurable for the default HttpCache store 2013-09-27 17:49:58 +02:00
Fabien Potencier
757efb656e bug#9103 [HttpFoundation] Header HTTP_X_FORWARDED_PROTO can contain various values (stloyd)
This PR was merged into the 2.2 branch.

Discussion
----------

[HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values

Header `HTTP_X_FORWARDED_PROTO` can contain various values. Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Tests pass?   | yes
| Fixed tickets | #9101
| License       | MIT

Commits
-------

d997443 [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
2013-09-27 17:05:15 +02:00
Fabien Potencier
279a686fcf minor#8823 [Security] [2.2] Added doc comments and missing use statement (piotrantosik)
This PR was merged into the 2.2 branch.

Discussion
----------

[Security] [2.2] Added doc comments and missing use statement

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

Commits
-------

7ee39a6 Added doc comments
2013-09-27 17:00:06 +02:00
Fabien Potencier
c2e43d0aa4 [Filesystem] removed getPath() on Exceptions and cleaned up CS and error messages 2013-09-27 16:57:51 +02:00
Christian Gartner
785080ab02 [Filesystem] introduced new Exception base classes 2013-09-27 16:40:55 +02:00
Fabien Potencier
c817539949 [Process] fixed tests 2013-09-27 16:31:42 +02:00
Fabien Potencier
500ddf3494 feature#8191 [Process] Added ProcessBuilder::setEnvironmentVariables (lyrixx)
This PR was merged into the master branch.

Discussion
----------

[Process] Added ProcessBuilder::setEnvironmentVariables

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

Commits
-------

b46ebf7 [Process] Added ProcessBuilder::addEnvironmentVariables
2013-09-27 16:30:49 +02:00
Stephane Escandell
e73742a25d [PropertyAccess] Throw exception on nonexistant "index" on read access 2013-09-27 16:14:57 +02:00
Fabien Potencier
9f35ca5ea1 Merge branch '2.3'
* 2.3:
  bumped Symfony version to 2.3.6
  updated VERSION for 2.3.5
  updated CHANGELOG for 2.3.5
  Set cost type to integer
  bumped Symfony version to 2.2.9
  updated VERSION for 2.2.8
  updated CHANGELOG for 2.2.8
  bumped the version
  fixed typo
  updated VERSION for 2.2.7
  update CONTRIBUTORS for 2.2.7
  updated CHANGELOG for 2.2.7
  bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com"
  fixed HTML5 form attribute handling XPath query
  Removed old way of building icu data.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2013-09-27 16:07:49 +02:00
Fabien Potencier
f396ec11f2 feature#8022 Make the getNode function public (DomCrawler) (wesleyh)
This PR was merged into the master branch.

Discussion
----------

Make the getNode function public (DomCrawler)

The getNode function should be public so that DomElement objects can be accessed directly if need be without having to loop manually.

Use case: Want to get to the tagname of a specific domelement.

Commits
-------

9868415 Make getNode function public
2013-09-27 15:59:33 +02:00
Fabien Potencier
eb6da72cf8 feature#8288 [Process] Added support for stdout and stderr flush (Issue #7884) (imobilis)
This PR was squashed before being merged into the master branch (closes #8288).

Discussion
----------

[Process] Added support for stdout and stderr flush (Issue #7884)

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7884
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/2728

**To-do**
- [x] Submit changes to the documentation.
- [x] Fix a test broken on travis.
- [x] Fix mistakes on the documentation.
- [x] Removed flush + get methods.
- [x] Changed tests assert calls.

This PR introduces flushing methods for both stdout and stderr on Process class. The new methods are:
- flushOutput(): clears the output buffer.
- flushErrorOutput(): clears the error output buffer.

Tests for new methods are included on the PR.

Commits
-------

90daef7 [Process] Added support for stdout and stderr flush (Issue #7884)
2013-09-27 15:52:58 +02:00
Juan Traverso
90daef75c6 [Process] Added support for stdout and stderr flush (Issue #7884) 2013-09-27 15:52:56 +02:00
Fabien Potencier
c5a65780db [Translation] fixed CS 2013-09-27 15:28:11 +02:00