Commit Graph

13553 Commits

Author SHA1 Message Date
Fabien Potencier
d87d8daa36 Merge branch '2.3' into 2.4
* 2.3:
  fixed a typo
  fixed CS for lambdas
  [Yaml] fixed some license headers
  Fixes message value for objects
  Check for hour, minute & second validity
  fixed various typos
  [Filesystem] Fixed mirror for symlinks
  [Validator] Removed duplicated test for IBAN in data provider

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
	src/Symfony/Component/Console/Application.php
	src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
	src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
	src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
2013-12-28 09:12:03 +01:00
Fabien Potencier
a2a6bd4dff fixed a typo 2013-12-28 08:54:52 +01:00
Fabien Potencier
35b407f016 fixed CS for lambdas 2013-12-28 08:46:05 +01:00
Fabien Potencier
93edf44950 [Yaml] fixed some license headers 2013-12-28 08:37:38 +01:00
Jon Gotlin
78eeba8f01 Fixes message value for objects 2013-12-27 22:53:58 +01:00
Fabien Potencier
f132197df6 feature #9360 [Finder] Fix finder date constraints and tests (ruian)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Finder] Fix finder date constraints and tests

Description:
When you search some files with date constraints, all folders are given, even if they are not in the date scope.

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

Commits
-------

4ccafa6 Fix finder date constraints and tests
2013-12-27 22:51:59 +01:00
Eric GELOEN
d0555f4498 Check for hour, minute & second validity 2013-12-27 22:48:33 +01:00
Fabien Potencier
c6b1c747b0 feature #9837 [Form] added getter to transformer chain (cordoval)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Form] added getter to transformer chain

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

Commits
-------

3565d96 added getter to transformer chain
2013-12-27 22:20:06 +01:00
Luis Cordova
9d89f1e16a avoid tables to have apparently long blank line breaks and be too far appart for long nested array params 2013-12-27 22:07:27 +01:00
Fabien Potencier
7a9ab2c79f feature #8305 Added MutableAclProvider::deleteSecurityIdentity (lavoiesl)
This PR was merged into the 2.5-dev branch.

Discussion
----------

Added MutableAclProvider::deleteSecurityIdentity

This provides a very simple function to enable the deletion of a SecurityIdentity.

Developers can add a listener on the delete of a user and remove all the related ACLs.
Foreign keys already ensure that the ACEs are properly deleted.

Among the problems of not deleting the SecurityIdentity:

* Inconsistent database, referring to a non-existent user.
* If a user is deleted and another is created with the same name, it will inherit all the old user’s ACEs

Not addressed by this PR: Changing a user’s username breaks the related ACLs. See #5787

See also: https://groups.google.com/forum/#!topic/symfony2/mGTXlTWiMs8/discussion

Commits
-------

bdbbe58 [Security][Acl] Issue #5787 : Added MutableAclProvider::deleteSecurityIdentity
2013-12-27 17:31:41 +01:00
Fabien Potencier
a4d423e4cd minor #8423 Update LocaleTest.php (mikemeier)
This PR was squashed before being merged into the 2.5-dev branch (closes #8423).

Discussion
----------

Update LocaleTest.php

de_CH locales does not fallback to de
see https://github.com/symfony/symfony/issues/5314

Commits
-------

572126b Update LocaleTest.php
2013-12-27 17:00:18 +01:00
Mike Meier
572126be07 Update LocaleTest.php 2013-12-27 17:00:16 +01:00
Fabien Potencier
04471c9916 minor #9869 fixed various typos (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed various typos

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

Commits
-------

2f15ac7 fixed various typos
2013-12-27 16:16:38 +01:00
Fabien Potencier
2f15ac7507 fixed various typos 2013-12-27 16:08:19 +01:00
COil
d136555fc7 [Filesystem] Fixed mirror for symlinks 2013-12-27 14:13:43 +01:00
Fabien Potencier
694bd72611 Merge branch '2.4'
* 2.4: (44 commits)
  [FrameworkBundle] Add missing license headers
  Fix parent serialization of user object
  [DependencyInjection] fixed typo
  added condition to avoid skipping tests on JSON_PRETTY support
  add memcache, memcached, and mongodb extensions to run skipped tests
  [DependencyInjection] Fixed support for backslashes in service ids.
  fix #9356 [Security] Logger should manipulate the user reloaded from provider
  [FrameworkBundle] Added extra details in XMLDescriptor to improve container description
  fixed CS
  Crawler default namespace fix
  [BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases
  [HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4)
  fix 5528 let ArrayNode::normalizeValue respect order of value array provided
  fix #7243 allow 0 as arraynode name
  Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes #9403).
  BinaryFileResponse should also return 416 or 200 on some range-requets
  fix deprecated usage and clarify constructor defaults for number formatter
  Bumping dependency to ProxyManager to allow testing against the new 0.5.x branch changes
  Do normalization on tag options
  bumped Symfony version to 2.3.9
  ...
2013-12-26 08:59:17 +01:00
Fabien Potencier
ef3ae9cf45 Merge branch '2.3' into 2.4
* 2.3: (31 commits)
  Fix parent serialization of user object
  [DependencyInjection] fixed typo
  add memcache, memcached, and mongodb extensions to run skipped tests
  [DependencyInjection] Fixed support for backslashes in service ids.
  fix #9356 [Security] Logger should manipulate the user reloaded from provider
  [BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases
  [HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4)
  fix 5528 let ArrayNode::normalizeValue respect order of value array provided
  fix #7243 allow 0 as arraynode name
  Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes #9403).
  BinaryFileResponse should also return 416 or 200 on some range-requets
  Do normalization on tag options
  bumped Symfony version to 2.3.9
  updated VERSION for 2.3.8
  update CONTRIBUTORS for 2.3.8
  updated CHANGELOG for 2.3.8
  [Filesystem] Changed the mode for a target file in copy() to be write only.
  [Console] fixed CS
  fixed TableHelper when cell value has new line
  Improved and fixed grammar mistakes. Added pluralized messages
  ...

Conflicts:
	src/Symfony/Component/BrowserKit/Cookie.php
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Routing/Matcher/UrlMatcher.php
2013-12-26 08:59:03 +01:00
Joseph Bielawski
4c74ea62be [FrameworkBundle] Add missing license headers 2013-12-24 12:39:30 +01:00
Stefano Sala
35610d0e8c [Validator] Removed duplicated test for IBAN in data provider 2013-12-23 19:08:15 +01:00
Stefano Sala
cf88ba58a6 [Validator] Fixed IBAN validator with 0750447346 value 2013-12-23 19:04:13 +01:00
Fabien Potencier
6a51831678 feature #9846 [Console] hide output of ProgressHelper when isDecorated is false (kbond)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] hide output of ProgressHelper when isDecorated is false

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

Commits
-------

006cb81 [Console] show no output in ProgressHelper when isDecorated is false (fixes #9511)
2013-12-23 17:13:46 +01:00
Kevin Bond
006cb81205 [Console] show no output in ProgressHelper when isDecorated is false (fixes #9511) 2013-12-23 11:03:00 -05:00
David de Boer
2d64dfc872 Fix parent serialization of user object 2013-12-23 16:46:26 +01:00
Fabien Potencier
8d39213f4c feature #8650 [Security][Acl] Add MutableAclProvider::updateUserSecurityIdentity (lemoinem)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Security][Acl] Add MutableAclProvider::updateUserSecurityIdentity

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

This provides a very simple function to enable the update of a User's username while keeping its associated ACEs (by updating its corresponding UserSecurityIdentity)

Developers can add a listener on the preUpdate of a user and remove all the related ACLs:

```php
if ($args->hasChangedField('username')) {
    $aclProvider = $this->container->get('security.acl.provider');

    $oldUsername = $args->getOldValue ('username');
    $user        = $args->getEntity();

    $aclProvider->updateUserSecurityIdentity(UserSecurityIdentity::fromAccount($user) , $oldUsername);
}
```
Among the problems of not updating the UserSecurityIdentity:

- Inconsistent database, referring to a non-existent user.
- The user loses all its associated permissions
- If another user is created with the old username, it will inherit all the first user’s ACEs

This PR intends to fix Issue #5787 and is similar to and inspired from PR #8305.
This will also be heavily impacted by the outcome of #8848

Commits
-------

da53d92 [Security][Acl] Fix #5787 : Add MutableAclProvider::updateUserSecurityIdentity
2013-12-23 16:31:59 +01:00
florianv
20d4eb6ad4 [PropertyAccess] Allowed non alphanumeric chars in object properties 2013-12-23 15:13:24 +01:00
Mathieu Lemoine
da53d92188 [Security][Acl] Fix #5787 : Add MutableAclProvider::updateUserSecurityIdentity 2013-12-23 09:05:55 -05:00
Fabien Potencier
408d992a3f [DependencyInjection] fixed typo 2013-12-23 10:20:48 +01:00
Luis Cordova
4b9d74d99c added condition to avoid skipping tests on JSON_PRETTY support 2013-12-22 16:57:40 +01:00
Luis Cordova
47a822de07 add memcache, memcached, and mongodb extensions to run skipped tests 2013-12-22 09:51:57 -05:00
Luis Cordova
3565d96efc added getter to transformer chain 2013-12-22 03:11:18 -05:00
fabios
7528e4c3c6 Allow cache drivers that are not an EM's child 2013-12-21 11:37:09 -05:00
Fabien Potencier
1ecfd447c1 bug #9834 [DependencyInjection] Fixed support for backslashes in service ids. (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Fixed support for backslashes in service ids.

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

This change is needed for consistency with `camelize()` which is used in [`ProxyDumper`](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php#L69) and [`PhpDumper`](https://github.com/symfony/DependencyInjection/blob/2.3/Dumper/PhpDumper.php#L1275).

Either this PR needs to be merged for consistency or #9610 rolled back (if we don't want to support backslashes in service ids).

Anyone could tell me why we're not using the `camelize()` method internally in the `Container`?

Commits
-------

c6f210b [DependencyInjection] Fixed support for backslashes in service ids.
2013-12-21 15:14:48 +01:00
Jakub Zalas
c6f210b5ad [DependencyInjection] Fixed support for backslashes in service ids.
This change is for consistency with camelize() which is used in ProxyDumper and PhpDumper.
2013-12-20 22:29:30 +01:00
Fabien Potencier
ad8d8727d9 minor #9689 [Form] Improved debugger icon (sukei)
This PR was merged into the 2.4 branch.

Discussion
----------

[Form] Improved debugger icon

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

Changes the form icon in the toolbar to be pixel perfect.

| before                                                                                               | after                                                                                               |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| ![before](https://f.cloud.github.com/assets/890645/1558707/8c4e2d42-4fa4-11e3-9397-376f761869a2.png) | ![after](https://f.cloud.github.com/assets/890645/1558708/90257844-4fa4-11e3-8a83-73d163d47261.png) |

Commits
-------

74e59fe Changes the form icon in the toolbar to be pixel perfect.
2013-12-20 16:43:57 +01:00
Matthieu Auger
eb86af961d fix #9356 [Security] Logger should manipulate the user reloaded from provider 2013-12-20 16:43:18 +01:00
Rouven Weßling
e00b0f34bd [DependencyInjection] fixes #9815 Syntax error in PHP dumper 2013-12-19 11:11:05 +01:00
Fabien Potencier
baaf9b63cd feature #9792 [EventDispatcher][HttpKernel] Move RegisterListenersPass from HttpKernel to EventDispatcher. (realityking)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[EventDispatcher][HttpKernel] Move RegisterListenersPass from HttpKernel to EventDispatcher.

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

I've been recently in the position to use the DependencyInjection Component and the EventDispatcher together but not HttpKernel. To make it easier to use these two together I propose moving RegisterListenersPass to the EventDispatcher component where the ContainerAwareEventDispatcher already resides.

Commits
-------

89b8e0a [EventDispatcher][HttpKernel] Move RegisterListenersPass from HttpKernel to EventDispatcher.
2013-12-18 18:23:40 +01:00
Rouven Weßling
89b8e0a949 [EventDispatcher][HttpKernel] Move RegisterListenersPass from HttpKernel to EventDispatcher. 2013-12-18 18:16:40 +01:00
Fabien Potencier
ad4d6f76f3 feature #9668 [DepdencyInjection] forgot to add definition of dumped container member variable parameters (cordoval)
This PR was squashed before being merged into the 2.5-dev branch (closes #9668).

Discussion
----------

[DepdencyInjection] forgot to add definition of dumped container member variable parameters

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

this fixes the allowing of access to parameters property of the dumped container

Commits
-------

5b02d3f [DepdencyInjection] forgot to add definition of dumped container member variable parameters
2013-12-18 17:49:04 +01:00
Luis Cordova
5b02d3fa0c [DepdencyInjection] forgot to add definition of dumped container member variable parameters 2013-12-18 17:49:03 +01:00
Rouven Weßling
0d78776fbd [DependencyInjection] fix a regression introduced in #9807
Always dump the fully qualified class name, to support dumping containers in a namespace.
2013-12-18 15:16:42 +01:00
Fabien Potencier
11434de24c minor #9802 [HttpKernel] Remove FrameworkBundle dependency in BundleTest (florianv)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[HttpKernel] Remove FrameworkBundle dependency in BundleTest

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

 `HttpKernel` tests fatal due to missing dependency `AddConsoleCommandPass`.
Also removed unused import.

Commits
-------

20a064f [HttpKernel] Remove FrameworkBundle dependency in BundleTest
2013-12-18 11:22:10 +01:00
Fabien Potencier
0604220cb7 feature #9780 [Console] Added a way to set the process title (lyrixx)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] Added a way to set the process title

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

* I did not write test, because I want to RFC the idea before
* Do we want the process update its name when a sub command is executed by a master command ?

Commits
-------

204a25e [Console] Added a way to set the process title
2013-12-18 11:20:26 +01:00
florianv
20a064f36a [HttpKernel] Remove FrameworkBundle dependency in BundleTest 2013-12-18 10:14:22 +01:00
Alexander Volochnev
8edc855754 [FrameworkBundle] Added extra details in XMLDescriptor to improve container description 2013-12-18 10:01:49 +01:00
Rouven Weßling
be1eaaae9a [DependencyInjection] Avoid call_user_func in dumped containers. 2013-12-17 22:25:00 +01:00
Grégoire Pineau
204a25e3d5 [Console] Added a way to set the process title 2013-12-17 17:57:41 +01:00
Fabien Potencier
6249f17a4e fixed CS 2013-12-17 14:01:50 +01:00
Fabien Potencier
4a0989ba5b bug #9771 Crawler default namespace fix (crudecki)
This PR was squashed before being merged into the 2.4 branch (closes #9771).

Discussion
----------

Crawler default namespace fix

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9732, #6650
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/2979

Fix backwards compatibility of xml namespaces for having only one default namespace.

Commits
-------

cfff054 Crawler default namespace fix
2013-12-17 14:01:19 +01:00
ChrisC
cfff054e3b Crawler default namespace fix 2013-12-17 14:01:19 +01:00
Fabien Potencier
67ae8fab19 feature #8224 [Form][2.4] added an option for multiple files upload (closes #1400) (bamarni)
This PR was squashed before being merged into the 2.5-dev branch (closes #8224).

Discussion
----------

[Form][2.4] added an option for multiple files upload (closes #1400)

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

Commits
-------

c8c6448 [Form][2.4] added an option for multiple files upload (closes #1400)
2013-12-17 13:58:30 +01:00
Bilal Amarni
c8c6448168 [Form][2.4] added an option for multiple files upload (closes #1400) 2013-12-17 13:57:55 +01:00
Fabien Potencier
c1051d5afc fixed CS 2013-12-17 12:11:39 +01:00
Fabien Potencier
e660bc9831 feature #9773 [Form] Added delete_empty option to allow proper emptyData handling of collections (peterrehm)
This PR was squashed before being merged into the 2.5-dev branch (closes #9773).

Discussion
----------

[Form] Added delete_empty option to allow proper emptyData handling of collections

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

This PR adresses the issue that if you have a form collection with the option required => false and you submit an empty collection so you will get a ArrayCollection that contains en element with the value null.

This behaviour was introduced with the following changes from symfony/symfony#3257

In addition to the above mentioned ticket there is also a description about the same issue here: http://stackoverflow.com/questions/19474872/symfony2-form-collection-allow-add-and-allow-delete-null-error-silex

With the changes of this PR the new option empty_data is introduced. With this option you will be able to ignore/delete such empty collections, so they will neither be validated nor appear as empty field in the result.

The option will remove/ignore such empty collections if you add them newly and if allow_add is enabled and
removes such empty collections only if allow_delete is enabled.

With setting required and empty_data accordingly it will be now flexible to customize to the outcome you want to achieve.

Thanks to @bschussek for the great work together - We have to discuss how to name this option so if delete
or ignore is the appropriate name.

Commits
-------

8bdb7a0 [Form] Added delete_empty option to allow proper emptyData handling of collections
2013-12-17 12:10:53 +01:00
Peter Rehm
8bdb7a0460 [Form] Added delete_empty option to allow proper emptyData handling of collections 2013-12-17 12:10:53 +01:00
Fabien Potencier
21ecad160f minor #9723 [Security] [Acl] [MaskBuilder] Refactor common code and reduce nesting (djlambert)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Security] [Acl] [MaskBuilder] Refactor common code and reduce nesting

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

Refactored some common code and moved a comparison to an earlier statement.

Commits
-------

7d85809 Refactor common code and reduce nesting
2013-12-17 09:13:13 +01:00
Fabien Potencier
ba856e60bf bug #9769 [BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases (jzawadzki)
This PR was squashed before being merged into the 2.3 branch (closes #9769).

Discussion
----------

[BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases

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

Commits
-------

3132b04 [BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases
2013-12-17 09:03:37 +01:00
Jerzy Zawadzki
3132b0446c [BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases 2013-12-17 09:03:36 +01:00
Fabien Potencier
faf2c8e97e [HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4) 2013-12-17 09:02:48 +01:00
Luis Cordova
bee06e9c58 fix 5528 let ArrayNode::normalizeValue respect order of value array provided 2013-12-17 08:49:53 +01:00
Luis Cordova
2e0bf0e2e1 fix #7243 allow 0 as arraynode name 2013-12-17 08:36:17 +01:00
artem kolesnikov
0bbde05d8d Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes #9403). 2013-12-17 08:19:11 +01:00
Simon Schick
57ee5193d0 BinaryFileResponse should also return 416 or 200 on some range-requets 2013-12-16 20:50:58 +01:00
Rouven Weßling
4e9aa07aab [DependencyInjection] added support for inlining Configurators 2013-12-16 18:07:20 +01:00
Fabien Potencier
0af3d19c38 bug #9601 [Routing] Remove usage of deprecated _scheme requirement (Danez)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] Remove usage of deprecated _scheme requirement

**This is exact the same commit as it was in #9585, which was not merged due to my fault. Sorry for the noise.**

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

I removed all usages of the deprecated _scheme requirement inside the Routing Component.
Most parts were pretty easy and after multiple refactorings I came up with the solution to have a Route::hasScheme() method and check against this method.

I also checked for performance and after trying in_array, arra_flip+isset and foreach, the last one was clearly the winner.
https://gist.github.com/Danez/7609898#file-test_performance-php

I also adjusted all tests that test '_scheme' to also check the new schemes-requirement.

Commits
-------

557dfaa Remove usage of deprecated _scheme in Routing Component
2013-12-16 17:42:19 +01:00
Tobias Schultze
404944e5f6 fix deprecated usage and clarify constructor defaults for number formatter
by using the real default one can see the actual value without having to look into the implementation what NULL stands for
2013-12-16 17:29:16 +01:00
Marco Pivetta
c9cca843dc Bumping dependency to ProxyManager to allow testing against the new 0.5.x branch changes 2013-12-16 17:23:26 +01:00
Wouter J
06985eb123 Do normalization on tag options 2013-12-16 17:04:48 +01:00
Fabien Potencier
c05232fcfd bug #9135 [Form] [Validator] fix maxLength guesser (franek)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] [Validator] fix maxLength guesser

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

- [ ] need to add unit tests on ValidatorTypeGuesser.php

Commits
-------

f232550 remove deprecated constraints calls (Min, Max, MaxLength, MinLength)
2013-12-16 17:00:48 +01:00
Fabien Potencier
eccd938479 bumped Symfony version to 2.3.9 2013-12-16 16:25:46 +01:00
Fabien Potencier
c6596413df bug #9790 [Filesystem] Changed the mode for a target file in copy() to be write only (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Filesystem] Changed the mode for a target file in copy() to be write only

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

Stream wrappers like S3 [do not support w+](http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.S3.StreamWrapper.html) and we don't read here anyway (as pointed out in #9789).

Commits
-------

10e43b7 [Filesystem] Changed the mode for a target file in copy() to be write only.
2013-12-16 16:11:43 +01:00
Fabien Potencier
b0b421908d updated VERSION for 2.3.8 2013-12-16 15:36:05 +01:00
Jakub Zalas
10e43b7be8 [Filesystem] Changed the mode for a target file in copy() to be write only.
Stream wrappers like S3 do not support w+.
2013-12-16 11:23:38 +00:00
Grégoire Pineau
74d13e3622 [Debug] Added UndefinedMethodFatalErrorHandler 2013-12-16 11:52:16 +01:00
Fabien Potencier
dc79423d04 [Console] fixed CS 2013-12-15 19:46:51 +01:00
Krzysztof Przybyszewski
40e58cdc9a fixed TableHelper when cell value has new line 2013-12-15 19:44:57 +01:00
Fabien Potencier
f056ac1c22 bug #9760 [Routing] Fix router matching pattern against multiple hosts (karolsojko)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] Fix router matching pattern against multiple hosts

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

When you had a pattern that matched on multiple host then only the first one was displayed as "almost matching". Fixed router matching against the same pattern on multiple hosts so now it shows every "almost match" on different hosts.

Commits
-------

f727b22 [Routing] Fix router matching pattern against multiple hosts
2013-12-15 18:21:48 +01:00
benatespina
37962a6e94 Improved and fixed grammar mistakes. Added pluralized messages 2013-12-15 18:13:25 +01:00
Fabien Potencier
7b9f39e215 bug #9768 [FrameworkBundle] Fixed bug in XMLDescriptor (Exelenz)
This PR was squashed before being merged into the 2.4 branch (closes #9768).

Discussion
----------

[FrameworkBundle] Fixed bug in XMLDescriptor

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

Fixed bug in container:debug command where parameter value doesn't get printed.

Commits
-------

34d0b1d [FrameworkBundle] Fixed bug in XMLDescriptor
2013-12-15 18:04:04 +01:00
Alexander Volochnev
34d0b1dab3 [FrameworkBundle] Fixed bug in XMLDescriptor 2013-12-15 18:04:04 +01:00
Fabien Potencier
eed1db0d4d minor #9783 [BrowserKit] Add missing exception message parameter (bicpi)
This PR was merged into the 2.3 branch.

Discussion
----------

[BrowserKit] Add missing exception message parameter

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

Commits
-------

a834c2f [BrowserKit] Add missing exception message parameter
2013-12-15 18:00:33 +01:00
gondo
31c5979152 Update validators.cs.xlf
fixed CZ translation.
there is not such a word as "null" in czech
2013-12-15 17:54:46 +01:00
Philipp
a834c2fd6c [BrowserKit] Add missing exception message parameter
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -
2013-12-15 13:21:03 +01:00
Rouven Weßling
7f18d19df2 [Security] Add ExpressionLanguage to require-dev. 2013-12-15 00:12:17 +01:00
Javier Eguiluz
c9c21a51ad [Validator] updated the Spanish translation of the validator strings 2013-12-14 17:08:30 +01:00
Loïc Chardonnet
e1fe3272d2 Removed duplicated condition
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

Removed unnecessary condition (looks like it's been copy/pasted from
line 84).
2013-12-14 13:09:49 +01:00
karolsojko
f727b2254c [Routing] Fix router matching pattern against multiple hosts 2013-12-14 12:06:34 +01:00
Daniel Tschinder
557dfaa2c1 Remove usage of deprecated _scheme in Routing Component
Instead correctly use the array of schemes from the Route.
Also adjusted the dumpers to dump the correct data.

I extended the tests to not only test the deprecated behavior, but also
the new schemes-requirement.
2013-12-13 00:37:21 +01:00
Arturas Smorgun
e2ef38c806 Fix mistype which slipped through initial proof reading. 2013-12-12 18:03:36 +01:00
Fabien Potencier
b3afa8dda2 bug #9700 [ExpressionLanguage] throw exception when parameters contain expressions (aitboudad)
This PR was merged into the 2.4 branch.

Discussion
----------

[ExpressionLanguage] throw exception when parameters contain expressions

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

Commits
-------

ca123bc [ExpressionLanguage] throw exception when parameters contain expressions
2013-12-12 17:41:50 +01:00
Giulio De Donato
b7567d17d9 added ExpressionVoterTest 2013-12-12 17:37:42 +01:00
Christian Raue
6ddb12d1c7 renamed validators.ua.xlf to validators.uk.xlf
ISO 639-1 code for Ukrainian is "uk"
2013-12-12 17:34:24 +01:00
Fabien Potencier
c4bf848c5d bug #9722 [Validator]Fixed getting wrong msg when value is an object in Exception (aitboudad)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator]Fixed getting wrong msg when value is an object in Exception

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

Commits
-------

cdb5ae0 [Validator]Fixed getting wrong msg when value is an object in UnexpectedTypeException
2013-12-12 17:27:40 +01:00
Fabien Potencier
d490e5a541 bug #9750 allow TraceableEventDispatcher to reuse event instance in nested events (evillemez)
This PR was merged into the 2.3 branch.

Discussion
----------

allow TraceableEventDispatcher to reuse event instance in nested events

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

Commits
-------

454ce16 allow TraceableEventDispatcher to reuse event instance in nested events
2013-12-12 17:20:49 +01:00
Arturas Smorgun
923640ac4a Add missing lithuanian validator translations 2013-12-12 17:17:03 +01:00
Fabien Potencier
6764f91ce9 Merge branch '2.4'
* 2.4:
  fixed CS
  fixed CS
2013-12-12 17:10:54 +01:00
Fabien Potencier
0ac9f85f4d fixed CS 2013-12-12 17:10:42 +01:00
Fabien Potencier
c2c3504472 Merge branch '2.3' into 2.4
* 2.3:
  fixed CS
2013-12-12 17:09:11 +01:00
Fabien Potencier
3062681110 fixed CS 2013-12-12 17:08:59 +01:00
Evan Villemez
454ce16709 allow TraceableEventDispatcher to reuse event instance in nested events 2013-12-12 11:08:12 -05:00
Fabien Potencier
de5790314d Merge branch '2.4'
* 2.4:
  [Debug] fixed tests
  ErrorHandlerTest: restore_error_handler() on assertion failure
  Fixed typo
  [validator] throw an exception if isn't an instance of ConstraintValidatorInterface.
  Reset the box model to content-box in the web debug toolbar
  [FrameworkBundle] Allowed "0" as a checkbox value in the php template.
  raising delta on stopwatch as travis really breaks with less than 35
  Switched to correct gender of "Token"
  bumped Symfony version to 2.4.1
  updated VERSION for 2.4.0
  updated CHANGELOG for 2.4.0
  fixed typos in several translations
  [HttpKernel] use static late binding when dumping out container

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2013-12-12 17:07:18 +01:00
Fabien Potencier
4147141e1f Merge branch '2.3' into 2.4
* 2.3:
  Fixed typo
  [validator] throw an exception if isn't an instance of ConstraintValidatorInterface.
  Reset the box model to content-box in the web debug toolbar
  [FrameworkBundle] Allowed "0" as a checkbox value in the php template.
  raising delta on stopwatch as travis really breaks with less than 35
  Switched to correct gender of "Token"
  fixed typos in several translations
  [HttpKernel] use static late binding when dumping out container
2013-12-12 17:06:47 +01:00
Fabien Potencier
5f7cec1e38 [Debug] fixed tests 2013-12-12 17:06:35 +01:00
Nicolas Grekas
a259c048f4 ErrorHandlerTest: restore_error_handler() on assertion failure 2013-12-12 16:53:02 +01:00
Eduardo Conceição
113831ef11 Fixed typo 2013-12-10 14:47:08 +00:00
Derek Lambert
7d85809547 Refactor common code and reduce nesting 2013-12-08 11:07:52 -06:00
Abdellatif AitBoudad
cdb5ae0ede [Validator]Fixed getting wrong msg when value is an object in UnexpectedTypeException 2013-12-07 14:24:25 +00:00
Ait boudad Abdellatif
fc232a5d9a [validator] throw an exception if isn't an instance of ConstraintValidatorInterface. 2013-12-07 09:07:04 +01:00
Christophe Coevoet
ae95a718c3 Reset the box model to content-box in the web debug toolbar
This makes the styles compatible with CSS frameworks changing the box
model to box-sizing using a universal selector (Bootstrap 3 for instance).
2013-12-06 14:19:14 +01:00
Jakub Zalas
955e8cf084 [FrameworkBundle] Allowed "0" as a checkbox value in the php template. 2013-12-05 23:38:14 +00:00
Fabien Potencier
0c71cfa14b minor #9678 [HttpKernel] use static late binding when dumping out container (tgabi333)
This PR was submitted for the 2.2 branch but it was merged into the 2.3 branch instead (closes #9678).

Discussion
----------

[HttpKernel] use static late binding when dumping out container

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

This PR gives the ability to override the stripComments method in descendants (and to disable the memory-eater container whitespace stripping)

Commits
-------

2e241cc [HttpKernel] use static late binding when dumping out container
2013-12-05 08:46:04 +01:00
Luis Cordova
8d53d8f2c0 raising delta on stopwatch as travis really breaks with less than 35 2013-12-05 08:40:22 +01:00
Abdellatif AitBoudad
ca123bc7af [ExpressionLanguage] throw exception when parameters contain expressions 2013-12-04 21:23:04 +00:00
Christian Gärtner
a36abaf1b5 Switched to correct gender of "Token"
The neutral gender "das Token" is used in science to describe an array of bits or chars, where as the masculin "der Token" is commenly used for keys in communications and authentication in the network.

I guess the a CSRF-Token is more a key for authentication then a bit array.
2013-12-04 16:53:59 +01:00
Quentin Schuler
74e59fecde Changes the form icon in the toolbar to be pixel perfect. 2013-12-04 15:02:35 +01:00
Fabien Potencier
d46d725d27 minor #9684 [2.3] fix typos in several translations (craue)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] fix typos in several translations

| Q             | A
| ------------- | ---
| Fixed tickets | --
| License       | MIT

Similar to #9681, but for 2.3, with one additional change.

Commits
-------

8209a7f fixed typos in several translations
2013-12-03 22:41:48 +01:00
Fabien Potencier
a20b9a4103 bumped Symfony version to 2.4.1 2013-12-03 18:55:46 +01:00
Fabien Potencier
2e47d2edd4 updated VERSION for 2.4.0 2013-12-03 16:23:03 +01:00
Fabien Potencier
e5362c1e8a Merge branch '2.4'
* 2.4:
  updated Composer suggested packages
  updated VERSION for 2.2.11
  update CONTRIBUTORS for 2.2.11
  updated CHANGELOG for 2.2.11
  Fixed typo in phpdoc
  Default form.csrf_protection.enabled to csrf_protection.enabled
  Handled the scenario when no entity manager is passed with closure query builder.
  Enabled csrf_protection by default if form.csrf_protection is enabled
  [HttpKernel] made a small optimization to Bundle initialization
  minor optimalization at bundle initialization
  [EventDispatcher] tweaked README
  removed observer pattern, in favour of mediator
  [DoctrineBridge] normalized class names in the ORM type guesser
  Fix `extract` method to avoid recalculating count() for each iteration.
  [Debug] ensured that a fatal PHP error is actually fatal after being handled by our error handler
  use the correct class name to retrieve mapped class' metadata and repository
  [WebProfilerBundle] Fixed js escaping in time.html.twig
2013-12-03 15:52:29 +01:00
Fabien Potencier
d618762956 Merge branch '2.3' into 2.4
* 2.3:
  updated VERSION for 2.2.11
  update CONTRIBUTORS for 2.2.11
  updated CHANGELOG for 2.2.11
  Fixed typo in phpdoc
  Handled the scenario when no entity manager is passed with closure query builder.
  [HttpKernel] made a small optimization to Bundle initialization
  minor optimalization at bundle initialization
  [EventDispatcher] tweaked README
  removed observer pattern, in favour of mediator
  [DoctrineBridge] normalized class names in the ORM type guesser
  Fix `extract` method to avoid recalculating count() for each iteration.
  [Debug] ensured that a fatal PHP error is actually fatal after being handled by our error handler
  use the correct class name to retrieve mapped class' metadata and repository
  [WebProfilerBundle] Fixed js escaping in time.html.twig

Conflicts:
	src/Symfony/Component/Debug/ErrorHandler.php
2013-12-03 15:52:22 +01:00
Fabien Potencier
40c097276d Merge branch '2.2' into 2.3
* 2.2:
  updated VERSION for 2.2.11
  update CONTRIBUTORS for 2.2.11
  updated CHANGELOG for 2.2.11
  [HttpKernel] made a small optimization to Bundle initialization
  minor optimalization at bundle initialization
  [EventDispatcher] tweaked README
  removed observer pattern, in favour of mediator
  [DoctrineBridge] normalized class names in the ORM type guesser
  Fix `extract` method to avoid recalculating count() for each iteration.
  use the correct class name to retrieve mapped class' metadata and repository
  [WebProfilerBundle] Fixed js escaping in time.html.twig

Conflicts:
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig
	src/Symfony/Component/HttpKernel/Kernel.php
2013-12-03 15:51:26 +01:00
Christian Raue
8209a7f95b fixed typos in several translations 2013-12-03 11:59:03 +01:00
Abdellatif AitBoudad
50c7dd576d updated Composer suggested packages 2013-12-03 11:22:45 +01:00
Tóth Gábor
2e241cc606 [HttpKernel] use static late binding when dumping out container 2013-12-02 15:32:33 +01:00
Fabien Potencier
6a9c223b06 updated VERSION for 2.2.11 2013-12-02 08:14:10 +01:00
Markus Staab
fe735ed4be Fixed typo in phpdoc 2013-12-02 07:43:49 +01:00
Fabien Potencier
efcca3e2e1 bug #9673 Fixed BC break in csrf protection (WouterJ)
This PR was merged into the 2.4 branch.

Discussion
----------

Fixed BC break in csrf protection

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

Commits
-------

d00954a Default form.csrf_protection.enabled to csrf_protection.enabled
2013-12-01 14:57:34 +01:00
Wouter J
d00954a14e Default form.csrf_protection.enabled to csrf_protection.enabled 2013-12-01 13:27:05 +01:00
Jakub Zalas
a534b55fcb Handled the scenario when no entity manager is passed with closure query builder. 2013-11-30 19:02:13 +01:00
Bernhard Schussek
5bf759a54e Enabled csrf_protection by default if form.csrf_protection is enabled 2013-11-30 17:55:47 +01:00
Fabien Potencier
3330c40621 [HttpKernel] made a small optimization to Bundle initialization 2013-11-30 13:45:29 +01:00
Gábor Tóth
4ba6c0b90e minor optimalization at bundle initialization
fast check to avoid six array method calls
2013-11-30 13:44:15 +01:00
Fabien Potencier
b82ab2ab13 minor #9661 Removed observer pattern, in favour of mediator (fabpot)
This PR was merged into the 2.2 branch.

Discussion
----------

Removed observer pattern, in favour of mediator

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | *
| Fixed tickets | #9344

I don't think this is the best tool to implement the observer pattern.

I just have copied the sentence from:
https://github.com/symfony/symfony-docs/edit/2.3/components/event_dispatcher/introduction.rst

but maybe could be improved with something like:

"Symfony Event Dispatcher is a tool that allows to make your projects truly extensible, facilitating the implementation of Mediator pattern and Publish subscribe pattern"

[edit-1]
I think this could be modified also here:
https://github.com/symfony/symfony-marketing/edit/master/views/en/get_started/components.html.twig

Commits
-------

ab3e231 [EventDispatcher] tweaked README
b9ad62e removed observer pattern, in favour of mediator
2013-11-30 10:39:57 +01:00
Fabien Potencier
ab3e231b93 [EventDispatcher] tweaked README 2013-11-30 10:35:04 +01:00
Giulio De Donato
b9ad62e15c removed observer pattern, in favour of mediator 2013-11-30 10:34:17 +01:00
Fabien Potencier
05b17555d4 bug #9656 [DoctrineBridge] normalized class names in the ORM type guesser (fabpot)
This PR was merged into the 2.2 branch.

Discussion
----------

[DoctrineBridge] normalized class names in the ORM type guesser

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

Commits
-------

a1b9c2e [DoctrineBridge] normalized class names in the ORM type guesser
2013-11-29 15:23:51 +01:00
Fabien Potencier
a1b9c2ed60 [DoctrineBridge] normalized class names in the ORM type guesser 2013-11-29 15:03:45 +01:00
Fabien Potencier
261a459876 bug #9647 use the correct class name to retrieve mapped class' metadata and reposi... (xabbuh)
This PR was merged into the 2.2 branch.

Discussion
----------

use the correct class name to retrieve mapped class' metadata and reposi...

...tory

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

The validation context isn't necessarily the entity being validated. In case that you added the Unique Entity constraint inside your custom type via the ``constraints`` option the validation context will be the ``Form`` class itself. Thus, not the validation context should be used to get the class metadata and the repository of the validated entity, but the entity itself should be used.

Commits
-------

cd4df11 use the correct class name to retrieve mapped class' metadata and repository
2013-11-29 14:14:31 +01:00
Youpie
3447f896a7 Fix extract method to avoid recalculating count() for each iteration.
Cache the value of `count($attributes)` to avoid recalculating it for each iteration of the loop.

Since this count will never change during the method execution, this change make the code a bit more efficient.
2013-11-29 06:58:12 +01:00
Fabien Potencier
d7a4cfb0e4 [Debug] ensured that a fatal PHP error is actually fatal after being handled by our error handler 2013-11-28 17:41:31 +01:00
Christian Flothmann
cd4df11b06 use the correct class name to retrieve mapped class' metadata and repository 2013-11-28 17:08:45 +01:00
Martin Hasoň
4828350370 [WebProfilerBundle] Fixed js escaping in time.html.twig 2013-11-28 13:42:54 +01:00
Fabien Potencier
db4f551527 Merge branch '2.4'
* 2.4:
  [Debug] fixed unit tests
  Avoid notice from being *eaten* by fatal error.
  Teardown used wrong property
  Modified guessDefaultEscapingStrategy to not escape txt templates
  Fix DateType for 32bits computers.
  Fixed the registration of validation.xml file when the form is disabled
  fixed lexing expression ending with spaces
  Fixes #9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase
  [Validator] Replaced inexistent interface.
  [HttpKernel] Fix profiler event-listener usage outside request stack context
  When getting the session's id, check if the session is not closed
  Fix undefined offset when formatting namespace suggestions
  Adjusting CacheClear Warmup method to namespaced kernels
2013-11-28 11:27:35 +01:00
Fabien Potencier
1a33e1b18b Merge branch '2.3' into 2.4
* 2.3:
  [Debug] fixed unit tests
  Avoid notice from being *eaten* by fatal error.
  Teardown used wrong property
  Modified guessDefaultEscapingStrategy to not escape txt templates
  Fix DateType for 32bits computers.
  Fixed the registration of validation.xml file when the form is disabled
  Fixes #9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase
  [Validator] Replaced inexistent interface.
  When getting the session's id, check if the session is not closed
  Adjusting CacheClear Warmup method to namespaced kernels

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
2013-11-28 11:27:26 +01:00
Fabien Potencier
ad9008e452 Merge branch '2.2' into 2.3
* 2.2:
  Teardown used wrong property
  Modified guessDefaultEscapingStrategy to not escape txt templates
  Fix DateType for 32bits computers.
  Fixed the registration of validation.xml file when the form is disabled
  When getting the session's id, check if the session is not closed
2013-11-28 11:26:47 +01:00
Fabien Potencier
872d584c94 [Debug] fixed unit tests 2013-11-28 11:16:43 +01:00
Christian Schmidt
2d6c2aac3a Avoid notice from being *eaten* by fatal error. 2013-11-28 11:16:19 +01:00
Jan Behrens
e1d0d5c1f7 Teardown used wrong property 2013-11-28 08:36:42 +01:00
Marek Štípek
9f35368847 Modified guessDefaultEscapingStrategy to not escape txt templates
Useful for plaintext emails.
2013-11-28 08:35:42 +01:00
WedgeSama
2f9bb75174 Fix DateType for 32bits computers. 2013-11-28 08:06:13 +01:00
Martin Hasoň
d0c1db82fa Fixed the registration of validation.xml file when the form is disabled 2013-11-28 08:03:21 +01:00
Fabien Potencier
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