Commit Graph

37472 Commits

Author SHA1 Message Date
Maxime Steinhausser
bce59c8427 [Serializer] Deprecate CsvEncoder as_collection false default value 2018-06-30 10:39:07 +02:00
Fabien Potencier
83232f85ff feature #27675 [DoctrineBridge] always load event listeners lazy via ServiceLocator (dmaicher)
This PR was squashed before being merged into the 4.2-dev branch (closes #27675).

Discussion
----------

[DoctrineBridge] always load event listeners lazy via ServiceLocator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes/no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/27661
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/9973

As described in https://github.com/symfony/symfony/issues/27661 this PR suggests to always load doctrine event listeners lazily from a service locator instead of the full service container.

If we agree to move forward I could tackle the remaining todos:

- [x] update UPGRADE.md
- [x] documentation PR
- [x] tested on real app

Commits
-------

130ec0525d [DoctrineBridge] always load event listeners lazy via ServiceLocator
2018-06-28 10:12:17 +02:00
David Maicher
130ec0525d [DoctrineBridge] always load event listeners lazy via ServiceLocator 2018-06-28 10:12:09 +02:00
Nicolas Grekas
d3a43b177a Merge branch '4.1'
* 4.1:
  [HttpFoundation] fix merge
2018-06-28 10:10:58 +02:00
Nicolas Grekas
fd8fd3df47 [HttpFoundation] fix merge 2018-06-28 10:10:40 +02:00
Nicolas Grekas
17977c8d0c bug #27734 [Cache] ArrayAdapter and NullAdapter don't need stampede protection (Pierre Rineau)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] ArrayAdapter and NullAdapter don't need stampede protection

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | probably
| Fixed tickets | #27734 #27731
| License       | MIT

Cf. issues.

Commits
-------

3178aed84e [Cache] ArrayAdapter and NullAdapter don't need stampede protection
2018-06-28 08:42:31 +02:00
Pierre Rineau
3178aed84e [Cache] ArrayAdapter and NullAdapter don't need stampede protection 2018-06-28 08:41:11 +02:00
Nicolas Grekas
adb137d5c1 Merge branch '4.1'
* 4.1:
  [Routing] Disallow object usage inside Route
  [HttpFoundation] missing namespace for RedisProxy
  [Routing] fix too much greediness in host-matching regex
  [HttpFoundation] fix registration of session proxies
  failing test to reproduce session problem
  [HttpFoundation] fix session tracking counter
2018-06-28 08:35:46 +02:00
Nicolas Grekas
223cf06121 Merge branch '4.0' into 4.1
* 4.0:
  [HttpFoundation] fix registration of session proxies
  failing test to reproduce session problem
  [HttpFoundation] fix session tracking counter
2018-06-28 08:35:31 +02:00
Nicolas Grekas
9aecd2b436 Merge branch '3.4' into 4.0
* 3.4:
  [HttpFoundation] fix registration of session proxies
  failing test to reproduce session problem
  [HttpFoundation] fix session tracking counter
2018-06-28 08:35:12 +02:00
Nicolas Grekas
b9a3c870d9 bug #27714 [HttpFoundation] fix session tracking counter (nicolas-grekas, dmaicher)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] fix session tracking counter

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

As just discussed with @nicolas-grekas I found this issue today while upgrading my app to 3.4.12. Somehow its not possible anymore to set caching headers correctly since this commit: 146e01cb44 (diff-5350dc763df30ada9d00563c115f6652)

Commits
-------

89ed756462 failing test to reproduce session problem
26fc4e683f [HttpFoundation] fix session tracking counter
2018-06-28 08:32:50 +02:00
Nicolas Grekas
9604e69d7c bug #27727 [Routing] Disallow object usage inside Route (paxal)
This PR was submitted for the master branch but it was merged into the 4.1 branch instead (closes #27727).

Discussion
----------

[Routing] Disallow object usage inside Route

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

As discussed in #27723 the `Route` object should not support nested objects as attributes (`requirements`, `defaults`, ...).

Thus, if detected, an `\InvalidArgumentException` will be thrown.

Will fix #27723

Commits
-------

426fb45cfb [Routing] Disallow object usage inside Route
2018-06-28 08:30:39 +02:00
Cyril PASCAL
426fb45cfb [Routing] Disallow object usage inside Route 2018-06-28 08:30:33 +02:00
Nicolas Grekas
3f4644b2f1 bug #27736 [Routing] fix too much greediness in host-matching regex (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] fix too much greediness in host-matching regex

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

Commits
-------

e16b3023c0 [Routing] fix too much greediness in host-matching regex
2018-06-28 08:27:37 +02:00
Nicolas Grekas
ad066bbffc bug #27747 [HttpFoundation] fix registration of session proxies (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] fix registration of session proxies

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

Commits
-------

5ed40c095b [HttpFoundation] fix registration of session proxies
2018-06-28 08:26:51 +02:00
Nicolas Grekas
eb0a98f29f bug #27754 [HttpFoundation] missing namespace for RedisProxy (Bonfante)
This PR was submitted for the master branch but it was squashed and merged into the 4.1 branch instead (closes #27754).

Discussion
----------

[HttpFoundation] missing namespace for RedisProxy

I think the intention was to check if is instance of \Symfony\Component\Cache\Traits\RedisProxy

| Q             | A
| ------------- | ---
| Branch?       | 4.1 (becareful when merging)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

8e0acfc2db [HttpFoundation] missing namespace for RedisProxy
2018-06-28 08:23:56 +02:00
Bonfante
8e0acfc2db [HttpFoundation] missing namespace for RedisProxy 2018-06-28 08:23:50 +02:00
Nicolas Grekas
e16b3023c0 [Routing] fix too much greediness in host-matching regex 2018-06-28 07:55:37 +02:00
Nicolas Grekas
5ed40c095b [HttpFoundation] fix registration of session proxies 2018-06-28 07:25:33 +02:00
Nicolas Grekas
0c57f00ccd Merge branch '4.1'
* 4.1:
  Bump ext-mongodb to 1.5 on Travis
  Redesign the Debug error page in prod
  [DI] fix dumping deprecated service in yaml
  [Serializer] CsvEncoder::AS_COLLECTION_KEY constant
  bumped Symfony version to 4.1.2
  updated VERSION for 4.1.1
  updated CHANGELOG for 4.1.1
  bumped Symfony version to 4.0.13
  updated VERSION for 4.0.12
  updated CHANGELOG for 4.0.12
  bumped Symfony version to 3.4.13
  updated VERSION for 3.4.12
  updated CHANGELOG for 3.4.12
  bumped Symfony version to 2.8.43
  updated VERSION for 2.8.42
  update CONTRIBUTORS for 2.8.42
  updated CHANGELOG for 2.8.42
2018-06-27 23:06:44 +02:00
Nicolas Grekas
cd94ef22bf Merge branch '4.0' into 4.1
* 4.0:
  Bump ext-mongodb to 1.5 on Travis
  Redesign the Debug error page in prod
  [DI] fix dumping deprecated service in yaml
  bumped Symfony version to 4.0.13
  updated VERSION for 4.0.12
  updated CHANGELOG for 4.0.12
  bumped Symfony version to 3.4.13
  updated VERSION for 3.4.12
  updated CHANGELOG for 3.4.12
  bumped Symfony version to 2.8.43
  updated VERSION for 2.8.42
  update CONTRIBUTORS for 2.8.42
  updated CHANGELOG for 2.8.42
2018-06-27 23:05:46 +02:00
Nicolas Grekas
cbfb7a7495 Merge branch '3.4' into 4.0
* 3.4:
  Bump ext-mongodb to 1.5 on Travis
  Redesign the Debug error page in prod
  [DI] fix dumping deprecated service in yaml
  bumped Symfony version to 3.4.13
  updated VERSION for 3.4.12
  updated CHANGELOG for 3.4.12
  bumped Symfony version to 2.8.43
  updated VERSION for 2.8.42
  update CONTRIBUTORS for 2.8.42
  updated CHANGELOG for 2.8.42
2018-06-27 23:04:32 +02:00
Nicolas Grekas
af00528ff3 Merge branch '2.8' into 3.4
* 2.8:
  Bump ext-mongodb to 1.5 on Travis
2018-06-27 23:02:57 +02:00
Nicolas Grekas
476ef19b41 Bump ext-mongodb to 1.5 on Travis 2018-06-27 23:01:14 +02:00
David Maicher
89ed756462 failing test to reproduce session problem 2018-06-27 13:46:59 +02:00
Nicolas Grekas
26fc4e683f [HttpFoundation] fix session tracking counter 2018-06-27 13:36:49 +02:00
Fabien Potencier
0252a00311 feature #27499 Improved an error message related to controllers (javiereguiluz)
This PR was squashed before being merged into the 4.2-dev branch (closes #27499).

Discussion
----------

Improved an error message related to controllers

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

This proposal is irrelevant for experienced users but it may be useful for newcomers. After having delivered several introductory Symfony training, I can say that when someone adds `return "some string...";` in their controller, the error message is confusing:

![before](https://user-images.githubusercontent.com/73419/40959468-0faf790a-689d-11e8-9ce1-f6e0caf4b113.png)

Maybe we can reword it a bit? (I'm open for suggestions to improve the error message)

![after](https://user-images.githubusercontent.com/73419/40959505-29747070-689d-11e8-834e-92bf18760469.png)

Commits
-------

7510c3a335 Improved an error message related to controllers
2018-06-27 11:26:40 +02:00
Javier Eguiluz
7510c3a335 Improved an error message related to controllers 2018-06-27 11:25:38 +02:00
Fabien Potencier
1a3d445ec5 feature #26300 [PropertyInfo] Implement "Collection" types in PhpDocExtractor (popy-dev)
This PR was squashed before being merged into the 4.2-dev branch (closes #26300).

Discussion
----------

[PropertyInfo] Implement "Collection" types in PhpDocExtractor

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

Here's a proposition of implementation of my feature request #26299 :
I added few tests covering the requested feature, and I had to change a few things in the ```Symfony\Component\PropertyInfo\Util\PhpDocTypeHelper``` class (createType no longer gets a string, but a ```phpDocumentor\Reflection\Type``` instance) to be able to detect properly Collections and their subtypes.

Of course a simpler implementation is possible, without changing the PhpDocTypeHelper internal behaviour, by matching the input string against ```/^([^>]+)</``` and extracting the classname alone.

Commits
-------

12bafe46d0 [PropertyInfo] Implement \"Collection\" types in PhpDocExtractor
2018-06-26 18:34:19 +02:00
Pierre Dudoret
12bafe46d0 [PropertyInfo] Implement \"Collection\" types in PhpDocExtractor 2018-06-26 18:34:11 +02:00
Fabien Potencier
5971e2dd8f bug #27722 Redesign the Debug error page in prod (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

Redesign the Debug error page in prod

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

In `debug` mode, things are unchanged and the page looks like this:

![error-debug](https://user-images.githubusercontent.com/73419/41900161-5a2dfc3a-792e-11e8-8806-6333cce8cee9.png)

In `non-debug` mode, all Symfony-related things are removed and we use the same minimal design as the default `prod` error pages (see #27699):

![error-no-debug](https://user-images.githubusercontent.com/73419/41900218-798fda6c-792e-11e8-8b8e-22415ab810ac.png)

Commits
-------

7b9b1b9022 Redesign the Debug error page in prod
2018-06-26 18:31:54 +02:00
Javier Eguiluz
7b9b1b9022 Redesign the Debug error page in prod 2018-06-26 10:45:54 +02:00
Nicolas Grekas
3d8490e59c Merge branch '2.8' into 3.4
* 2.8:
  [DI] fix dumping deprecated service in yaml
  bumped Symfony version to 2.8.43
  updated VERSION for 2.8.42
  update CONTRIBUTORS for 2.8.42
  updated CHANGELOG for 2.8.42
2018-06-26 10:26:17 +02:00
Nicolas Grekas
1371b8f05a bug #27716 [DI] fix dumping deprecated service in yaml (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] fix dumping deprecated service in yaml

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

Commits
-------

411be25aba [DI] fix dumping deprecated service in yaml
2018-06-26 10:20:55 +02:00
Nicolas Grekas
411be25aba [DI] fix dumping deprecated service in yaml 2018-06-26 10:00:00 +02:00
Fabien Potencier
2b9c142f07 feature #26946 [WebProfilerBundle] Display uploaded files in the profiler (javiereguiluz)
This PR was squashed before being merged into the 4.2-dev branch (closes #26946).

Discussion
----------

[WebProfilerBundle] Display uploaded files in the profiler

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

![profiler_files](https://user-images.githubusercontent.com/73419/38807087-ac1e9bac-417b-11e8-99e0-317b437c986e.png)

Note: I wanted to use the VarDumper to display the table information (as we do in the rest of tables) but I had lots of problems and I just wanted to create a proof of concept for the feature to see if we like it.

Commits
-------

3f6f75bc12 [WebProfilerBundle] Display uploaded files in the profiler
2018-06-25 19:10:15 +02:00
Javier Eguiluz
3f6f75bc12 [WebProfilerBundle] Display uploaded files in the profiler 2018-06-25 19:10:04 +02:00
Fabien Potencier
21a3439a29 feature #27476 [Config] deprecate tree builders without root nodes (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Config] deprecate tree builders without root nodes

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

While reviewing #27472 I wondered if we really need support config trees without a root node. If we did not support it, users wouldn't create pseudo configuration classes when they were actually not needed.

Commits
-------

c2ce15301c deprecate tree builders without root nodes
2018-06-25 19:06:32 +02:00
Fabien Potencier
6f47d0cedd minor #27712 [Serializer] CsvEncoder::AS_COLLECTION_KEY constant (ogizanagi)
This PR was merged into the 4.1 branch.

Discussion
----------

[Serializer] CsvEncoder::AS_COLLECTION_KEY constant

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | no
| New feature?  | not really <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

We use public constants for context options. For 4.1 IMHO as a consistency fix.

Commits
-------

660a456d6f [Serializer] CsvEncoder::AS_COLLECTION_KEY constant
2018-06-25 18:58:35 +02:00
Fabien Potencier
d871473ef2 feature #27586 [PropertyAccess] Add Property Path to Exception Message (rodnaph)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[PropertyAccess] Add Property Path to Exception Message

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

When an exception is thrown writing a property it is not currently obvious which path is at fault (eg. `Expected argument of type "%s", "%s" given` - but where?). This patch appends the current property path to the exception so it is clear which path caused the error (eg. `Expected argument of type "%s", "%s" given at property path "foo.bar"`)

Commits
-------

473a025643 add property path to exception message when error writing property
2018-06-25 18:57:23 +02:00
Maxime Steinhausser
660a456d6f [Serializer] CsvEncoder::AS_COLLECTION_KEY constant 2018-06-25 18:22:54 +02:00
Fabien Potencier
e32b9650cb bumped Symfony version to 4.1.2 2018-06-25 15:32:41 +02:00
Fabien Potencier
68b56033c4
Merge pull request #27706 from fabpot/release-4.1.1
released v4.1.1
2018-06-25 15:07:10 +02:00
Fabien Potencier
c02e5001ba updated VERSION for 4.1.1 2018-06-25 15:06:45 +02:00
Fabien Potencier
4216dec479 updated CHANGELOG for 4.1.1 2018-06-25 15:06:25 +02:00
Fabien Potencier
54bca19bae bumped Symfony version to 4.0.13 2018-06-25 15:04:35 +02:00
Fabien Potencier
873c6ce541
Merge pull request #27705 from fabpot/release-4.0.12
released v4.0.12
2018-06-25 15:02:31 +02:00
Fabien Potencier
8984efc1ac updated VERSION for 4.0.12 2018-06-25 15:02:08 +02:00
Fabien Potencier
91a8af4fe6 updated CHANGELOG for 4.0.12 2018-06-25 15:02:02 +02:00
Fabien Potencier
2a2a9d89c8 bumped Symfony version to 3.4.13 2018-06-25 15:00:40 +02:00