Commit Graph

26276 Commits

Author SHA1 Message Date
Andrew Murray
ba64d7bb0d Fixed typo 2016-05-01 05:15:06 +02:00
Fabien Potencier
352997e61e minor #18664 [Form] [DoctrineBridge] updated changelogs after #18359 (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Form] [DoctrineBridge] updated changelogs after #18359

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

follows #18359.

Commits
-------

1c8dc9d [Form] [DoctrineBridge] updated changelogs after #18359
2016-04-29 17:38:41 +02:00
Fabien Potencier
39ddd2383f Merge pull request #18674 from fabpot/release-2.8.5
released v2.8.5
2016-04-29 17:34:08 +02:00
Fabien Potencier
25d166b4d8 updated VERSION for 2.8.5 2016-04-29 17:33:46 +02:00
Fabien Potencier
73677e57ab updated CHANGELOG for 2.8.5 2016-04-29 17:33:40 +02:00
Fabien Potencier
fb92d7a04a bumped Symfony version to 2.7.13 2016-04-29 12:50:16 +02:00
Fabien Potencier
9edf2430f1 Merge pull request #18670 from fabpot/release-2.7.12
released v2.7.12
2016-04-29 11:48:03 +02:00
Fabien Potencier
39890ed371 updated VERSION for 2.7.12 2016-04-29 11:47:36 +02:00
Fabien Potencier
1ce2f04915 update CONTRIBUTORS for 2.7.12 2016-04-29 11:47:34 +02:00
Fabien Potencier
2ada5535cd updated CHANGELOG for 2.7.12 2016-04-29 11:47:27 +02:00
Fabien Potencier
ca80946379 bumped Symfony version to 2.3.41 2016-04-29 11:36:11 +02:00
Jules Pietri
1c8dc9d06b [Form] [DoctrineBridge] updated changelogs after #18359
follows #18359.
2016-04-29 11:10:43 +02:00
Fabien Potencier
7bcb5deb31 Merge pull request #18669 from fabpot/release-2.3.40
released v2.3.40
2016-04-29 07:45:37 +02:00
Fabien Potencier
2dc63b3914 updated VERSION for 2.3.40 2016-04-29 07:38:17 +02:00
Fabien Potencier
30d7571ec6 update CONTRIBUTORS for 2.3.40 2016-04-29 07:37:50 +02:00
Fabien Potencier
84d46cc404 updated CHANGELOG for 2.3.40 2016-04-29 07:37:42 +02:00
Fabien Potencier
731d7a6bf0 Merge branch '3.0'
* 3.0:
  [Form] Fix tests added in #18180
2016-04-28 16:43:15 +02:00
Fabien Potencier
e2180e32c3 minor #18663 [Form] Fix tests added in #18180 (HeahDude)
This PR was submitted for the master branch but it was merged into the 3.0 branch instead (closes #18663).

Discussion
----------

[Form] Fix tests added in #18180

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

Commits
-------

c45a435 [Form] Fix tests added in #18180
2016-04-28 16:42:50 +02:00
Jules Pietri
c45a435805 [Form] Fix tests added in #18180 2016-04-28 16:42:50 +02:00
Fabien Potencier
1ab5be70ae feature #18656 Updating the error message of an AuthenticationEntryPointInterface (weaverryan)
This PR was merged into the 3.1-dev branch.

Discussion
----------

Updating the error message of an AuthenticationEntryPointInterface

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

During a training, we forgot to fill in the `start()` method for an entry point and got a *horrible* error message. Now, if you mess up `start()`, you get:

![screen shot 2016-04-27 at 12 49 50 pm](https://cloud.githubusercontent.com/assets/121003/14860378/92578e68-0c76-11e6-9fe5-45141fe2ce43.png)

Thanks!

Commits
-------

7b6c56c Updating the error message of an AuthenticationEntryPointInterface returns a non-Response object
2016-04-28 16:41:32 +02:00
Fabien Potencier
2f562c87ff feature #18069 [DoctrineBridge] deprecate MergeDoctrineCollectionListener::onBind() (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[DoctrineBridge] deprecate `MergeDoctrineCollectionListener::onBind()`

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

Commits
-------

ad08b95 [DoctrineBridge] deprecated `MergeDoctrineCollectionListener::onBind()`
2016-04-28 15:45:38 +02:00
Fabien Potencier
ae1baac0e6 bug #18659 [Cache] Dont use Redis connection when not required (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] Dont use Redis connection when not required

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

Commits
-------

1165459 [Cache] Dont use Redis connection when not required
2016-04-28 13:15:08 +02:00
Fabien Potencier
2d4df167c9 bug #18657 [FrameworkBundle] Fix a typo and add a test to prevent new regressions (Ener-Getick)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] Fix a typo and add a test to prevent new regressions

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

This fixes a typo introduced in #18630 and adds a new functional test to avoid most regressions in service definitions in the future when features are only available in non-debug mode.

cc @nicolas-grekas

Commits
-------

61872ce Fix a typo and add a check to prevent regressions
2016-04-28 13:13:57 +02:00
Fabien Potencier
745334e386 minor #18594 [Security] Normalize "symfony/security-acl" dependency versions across all composer.json files (siwinski)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] Normalize "symfony/security-acl" dependency versions across all composer.json files

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

There are some inconsistencies in the Symfony 2.8 `symfony/security-acl` dependency versions that would help downstream if we could just package `symfony/security-acl` 3.0.0 instead of having to package both versions 2.8.0 (for Symfony 2.8) and 3.0.0 (for Symfony 3.0).

```
$ git clone https://github.com/symfony/symfony.git
Cloning into 'symfony'...
cd remote: Counting objects: 319438, done.
nyReceiving objects:   4% (12778/319438), 2.06 MiB | 4.12 MiB/s
4Receiving objects:  41% (130970/319438), 40.80 MiB | 7.86 MiB/s
remote: Total 319438 (delta 0), reused 0 (delta 0), pack-reused 319437
Receiving objects: 100% (319438/319438), 68.46 MiB | 8.21 MiB/s, done.
Resolving deltas: 100% (204691/204691), done.
Checking connectivity... done.

$ cd symfony

$ git checkout v2.8.4
Previous HEAD position was 4e17cb2... Merge branch '2.8' into 3.0
HEAD is now at 9e14f9f... Merge branch '2.7' into 2.8

$ find . -name 'composer.json' | xargs grep 'symfony/security-acl'
./src/Symfony/Bundle/SecurityBundle/composer.json:        "symfony/security-acl": "~2.7|~3.0.0",
./src/Symfony/Bridge/Twig/composer.json:        "symfony/security-acl": "~2.6|~3.0.0",
./src/Symfony/Component/Security/composer.json:        "symfony/security-acl": "~2.7",
./composer.json:        "symfony/security-acl": "~2.7",
```

Commits
-------

e249bc3 [Security] Normalize "symfony/security-acl" dependency versions across all composer.json files
2016-04-28 13:08:06 +02:00
Fabien Potencier
321fd382bd minor #18575 Fixed a redundant check in DefaultValueResolver (iltar)
This PR was merged into the 3.1-dev branch.

Discussion
----------

Fixed a redundant check in DefaultValueResolver

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

In #18308 I have introduced a `DefaultValueResolver`. When writing documentation, I was planning on adding the code as an example and I noticed it did a check in the request attributes. A default value value should always be injected, whether the request has it or not. In case the request _does_ have the value, it would've already been added and thus never reach the default resolver.

Thus as this is never called in the default and configured flows and should not change the default value behavior, I'm removing this.

Commits
-------

e54c1a6 Fixed a redundant check in DefaultValueResolver
2016-04-28 13:04:44 +02:00
Fabien Potencier
cf38962dfe minor #18551 [FrameworkBundle] Remove misleading comment (JhonnyL)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Remove misleading comment

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

This is not true for service_container anymore.

Commits
-------

9f2f858 [FrameworkBundle] Remove misleading comment
2016-04-28 13:02:03 +02:00
Fabien Potencier
90e577c608 feature #18492 [LDAP] Check whether an entry attribute exists (hiddewie)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[LDAP] Check whether an entry attribute exists

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

Currently a method exists for getting the value of an attribute. It would make the Entry class more complete to be able to simply test if an attribute exists in the entry.

Commits
-------

56ef8a0 [LDAP] Check whether an entry attribute exists
2016-04-28 12:54:29 +02:00
Fabien Potencier
616ebb758f Revert "minor #18257 [Routing] Don't needlessly execute strtr's as they are fairly expensive (arjenm)"
This reverts commit f03dc6eec5, reversing
changes made to 2f2ce3e637.
2016-04-28 12:50:58 +02:00
Fabien Potencier
e9dda1ee0a Revert "fixed CS"
This reverts commit ba1cd26237.
2016-04-28 12:50:52 +02:00
Fabien Potencier
fcf5e278d7 bug #18246 [DependencyInjection] fix ambiguous services schema (backbone87)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] fix ambiguous services schema

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

Commits
-------

9828f23 bug #17460 [DI] fix ambiguous services schema
2016-04-28 12:41:45 +02:00
Fabien Potencier
becdbd9ea8 fixed CS 2016-04-28 12:32:50 +02:00
Fabien Potencier
89b6bb84e5 bug #18618 [HttpKernel] tweaked redirection profiling in RequestDataCollector (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[HttpKernel] tweaked redirection profiling in RequestDataCollector

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

- c8ba3b2 removes duplicated code forgotten in #17589

- a47d2e8 fixes the collecting of redirect data in first sub request instead of redirected master request.

Commits
-------

df19c14 use a request attribute flag for redirection profile
b26cb6d [HttpKernel] added RequestDataCollector::onKernelResponse()
c8ba3b2 [HttpKernel] remove legacy duplicated code
2016-04-28 12:32:03 +02:00
Fabien Potencier
90eee01a17 fixed CS 2016-04-28 12:28:25 +02:00
Jules Pietri
ad08b951d7 [DoctrineBridge] deprecated MergeDoctrineCollectionListener::onBind() 2016-04-28 12:28:21 +02:00
Fabien Potencier
cc8c5b5181 bug #18566 [SecurityBundle] fixed DebugAccessDecisionManager config (HeahDude)
This PR was squashed before being merged into the 3.1-dev branch (closes #18566).

Discussion
----------

[SecurityBundle] fixed DebugAccessDecisionManager config

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

Commits
-------

53c78fe [SecurityBundle] fixed DebugAccessDecisionManager config
2016-04-28 12:25:11 +02:00
Jules Pietri
53c78fe93b [SecurityBundle] fixed DebugAccessDecisionManager config 2016-04-28 12:24:52 +02:00
Fabien Potencier
ee679bf18e added a missing @group legacy 2016-04-28 12:18:51 +02:00
Fabien Potencier
5a64e5869e fixed typos 2016-04-28 12:17:48 +02:00
Fabien Potencier
0c5b83ab95 feature #18359 [Form] [DoctrineBridge] optimized LazyChoiceList and DoctrineChoiceLoader (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Form] [DoctrineBridge] optimized LazyChoiceList and DoctrineChoiceLoader

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

Problem
======
Actually we got a circular dependency:

| Object | Return
|----------|-------------|
|`DefaultChoiceListFactory::createListFromLoader()` (decorated) | `LazyChoiceList` with loader and resolved `$value`
| `LazyChoiceList::get*` | `DoctrineChoiceLoader` with resolved `$value`
`DoctrineChoiceLoader::loadChoiceList()` | (decorated) `DefaultChoiceListFactory` with loaded choices and resolved `$value`
`DefaultChoiceListFactory::createListFromChoices()` | `ArrayChoiceList` with `resolved `$value`

With this refactoring, the `DoctrineChoiceLoader` is no longer dependant to the factory, the `ChoiceLoaderInterface::loadChoiceList()` must return a `ChoiceListInterface` but should not need a decorated factory while `$value` is already resolved. It should remain lazy IMHO.

Solution
======

| Object | Return |
|----------|-----------|
| `DefaultChoiceListFactory::createListFromLoader()` | `LazyChoiceList` with loader and resolved `$value`
| `LazyChoiceList::get*()` | `DoctrineChoiceLoader` with resolved `$value`
| `DoctrineChoiceLoader::loadChoiceList()` | `ArrayChoiceList` with resolved `$value`.

Since `choiceListFactory` is a private property, this change should be safe regarding BC.

To justify this change, I've made some blackfire profiling.
You can see my [branch of SE here](https://github.com/HeahDude/symfony-standard/tree/test/optimize-doctrine_choice_loader) and the [all in file test implementation](https://github.com/HeahDude/symfony-standard/blob/test/optimize-doctrine_choice_loader/src/AppBundle/Controller/DefaultController.php).

Basically it loads a form with 3 `EntityType` fields with different classes holding 50 instances each.

(INIT events are profiled with an empty cache)

When | What | Diff (SE => PR)
--------|-------|------
INIT (1) | build form (load types) | [see](https://blackfire.io/profiles/compare/061d5d28-15c6-4e01-b8c0-3edc9cb8daf0/graph)
INIT (2) | build view (load choices) | [see](https://blackfire.io/profiles/compare/04f142a8-d886-405a-be4d-636ba82d8acd/graph)
CACHED | build form (load types) | [see](https://blackfire.io/profiles/compare/293b27b6-aa58-42ae-bafb-655513201505/graph)
CACHED | build view (load choices) | [see](https://blackfire.io/profiles/compare/e5b37dfe-cc9e-498f-b98a-7448830ad190/graph)
SUBMIT | build form (load types) | [see](https://blackfire.io/profiles/compare/7f3baea9-0d27-46b6-8c24-c577742382dc/graph)
SUBMIT | handle request (load choices) | [see](https://blackfire.io/profiles/compare/8644ebfb-4397-495b-8f3d-1a6e1d7f8476/graph)
SUBMIT | build view (load values) | [see](https://blackfire.io/profiles/compare/89c3cc7c-ea07-4300-91b3-99004cb58ea1/graph)

(1):
![build_form-no_cache](https://cloud.githubusercontent.com/assets/10107633/14136166/b5a85eb8-f661-11e5-8556-3e0dcbfaf404.jpg)
(2):
![build_view-no_cache](https://cloud.githubusercontent.com/assets/10107633/14136240/1162f3ee-f662-11e5-834a-1ed1e519dc83.jpg)

It can seem like 1 and 2 balance each other but it comes clear when comparing values:

| -  | Build form | Build view |
|-----|---------|--------------|
| wall time | -88 ms | +9.71 ms
| blocking I/O | -40 ms | +3.67 ms
| cpu | -48 ms | +13.4 ms
| memory | -4.03 MB | +236 kB
| network | -203 B | +2.21 kB

Commits
-------

98621f4 [Form] optimized LazyChoiceList
86b2ff1 [DoctrineBridge] optimized DoctrineChoiceLoader
2016-04-28 12:16:40 +02:00
Fabien Potencier
d60292419b Merge branch '3.0'
* 3.0:
  fixed bad merge
2016-04-28 12:08:49 +02:00
Fabien Potencier
2a4dc34457 fixed bad merge 2016-04-28 12:08:45 +02:00
Fabien Potencier
50f2529acb feature #18357 [Form] Let TextType implement DataTransformerInterface (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Form] Let `TextType` implement `DataTransformerInterface`

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

Commits
-------

7e97fbb [Form] let `TextType` implements `DataTransformerInterface`
2016-04-28 12:07:03 +02:00
Fabien Potencier
996251ce13 fixed deprecation notices in tests 2016-04-28 11:59:09 +02:00
Fabien Potencier
461e8712bc Merge branch '3.0'
* 3.0:
  [Form] refactor CheckboxListMapper and RadioListMapper
  Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
2016-04-28 11:57:20 +02:00
Fabien Potencier
99be2fcfb7 Merge branch '2.8' into 3.0
* 2.8:
  [Form] refactor CheckboxListMapper and RadioListMapper
  Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
2016-04-28 11:57:11 +02:00
Fabien Potencier
5c235428d2 Merge branch '2.7' into 2.8
* 2.7:
  [Form] refactor CheckboxListMapper and RadioListMapper
  Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
2016-04-28 11:53:50 +02:00
Fabien Potencier
a8c10ac6e5 bug #18180 [Form] fixed BC break with pre selection of choices with ChoiceType and its children (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fixed BC break with pre selection of choices with `ChoiceType` and its children

| Q             | A
| ------------- | ---
| Branch        | 2.7+
| Bugfix?  | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18173, #14712, #17789
| License       | MIT
| Doc PR        | -

- f7eea72 reverts BC break introduced in #17760
- 58e8ed0 fixes pre selection of choice with model values such as `false`, `null` or empty string without BC break.

`ChoiceType` now always use `ChoiceToValueTransformer` or `ChoicesToValuesTransformer` depending on `multiple` option.
Hence `CheckboxListMapper` and `RadioListMapper` don't handle the transformation anymore.

Commits
-------

ea5375c [Form] refactor CheckboxListMapper and RadioListMapper
71841c7 Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
2016-04-28 11:51:12 +02:00
Fabien Potencier
44c3e32c29 Merge branch '3.0'
* 3.0:
  [Console] Fix wrong exceptions being thrown
  Add missing parenthesis in docblock description
  [FrameworkBundle] Remove duplicated code in ContainerDebugCommand
2016-04-28 11:49:00 +02:00
Fabien Potencier
dd3e5108b2 Merge branch '2.8' into 3.0
* 2.8:
  [Console] Fix wrong exceptions being thrown
  Add missing parenthesis in docblock description
  [FrameworkBundle] Remove duplicated code in ContainerDebugCommand
2016-04-28 11:48:42 +02:00
Fabien Potencier
fddf0736f5 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Remove duplicated code in ContainerDebugCommand
2016-04-28 11:48:28 +02:00