Commit Graph

33943 Commits

Author SHA1 Message Date
Nicolas Grekas
61e1f5705e bug #25232 [WebProfilerBundle] [TwigBundle] Fix Profiler breaking XHTML pages (tistre)
This PR was submitted for the master branch but it was merged into the 3.3 branch instead (closes #25232).

Discussion
----------

[WebProfilerBundle] [TwigBundle] Fix Profiler breaking XHTML pages

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

Just a tiny fix: Stop the Profiler from breaking XHTML pages (served with "Content-Type: application/xhtml+xml") - with the added quotes around the nonce attribute value, the page remains well-formed XML.

Commits
-------

b1ab7d0 [WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml)
2017-12-01 11:26:11 +01:00
Tim Strehle
b1ab7d0050 [WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml) 2017-12-01 11:26:11 +01:00
Yonel Ceruto
8505894988 Fix collision between view properties and form fields 2017-11-30 23:33:59 -05:00
Grégoire Paris
355bbd19fa
Use a more specific file for detecting the bridge
When using bin as a Composer bin-dir, this will break because both
composer.json and bin/simple-phpunit will exist relatively to the
current directory. This change checks for a non-binary file specific to
the bridge that will not have this issue.
Fixes #25228
2017-11-30 20:42:05 +01:00
Alex Rock Ancelet
159fedcef6
[HttpKernel] Fix issue when resetting DumpDataCollector 2017-11-30 20:02:12 +01:00
Fabien Potencier
76d356f36a bumped Symfony version to 3.4.1 2017-11-30 09:39:42 -08:00
Fabien Potencier
0a47db379b
Merge pull request #25223 from fabpot/release-3.4.0
released v3.4.0
2017-11-30 08:56:19 -08:00
Fabien Potencier
72538ff07f updated VERSION for 3.4.0 2017-11-30 08:56:05 -08:00
Fabien Potencier
09d8274fd8 updated CHANGELOG for 3.4.0 2017-11-30 08:55:59 -08:00
Nicolas Grekas
679eebb256 bug #25220 [HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one

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

MockFileSessionStorage should not create any file when the session is empty. Like the native session storage, it should ignore the metadataBag to decide if the session is empty.

And to prevent AbstractTestSessionListener from registered a wrong cookie, it must have access to this empty state, which is now possible thanks to a new `Session::isEmpty()` method. Implementing is requires access to the internal storage of bags, which is possible via an internal proxy.

Commits
-------

56846ac [HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one
2017-11-30 16:06:52 +01:00
Nicolas Grekas
7582b1a09e Merge branch '3.3' into 3.4
* 3.3:
  [VarDumper] Dont use empty(), it chokes on eg GMP objects
  [Dotenv] Changed preg_match flags from null to 0
  remove upgrade instructions for kernel.root_dir
  [HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
  [HttpKernel] add a test for FilterControllerEvents
2017-11-30 15:59:23 +01:00
Nicolas Grekas
56846ac6c1 [HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one 2017-11-30 15:56:21 +01:00
Nicolas Grekas
336600857b bug #25209 [VarDumper] Dont use empty(), it chokes on eg GMP objects (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[VarDumper] Dont use empty(), it chokes on eg GMP objects

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

Commits
-------

1b14173 [VarDumper] Dont use empty(), it chokes on eg GMP objects
2017-11-30 15:48:11 +01:00
Nicolas Grekas
26fb4c7055 bug #25200 [HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #25191
| License       | MIT
| Doc PR        | none

Coding in the train to Paris !

![img_2832](https://user-images.githubusercontent.com/3451634/33361971-8aa17a70-d4da-11e7-90a0-b2f08a60d0e6.JPG)

Commits
-------

d84b47f [HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
2017-11-30 15:42:59 +01:00
Nicolas Grekas
ae37c7ab76 bug #25201 [HttpKernel] Add a better error messages when passing a private or non-tagged controller (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Add a better error messages when passing a private or non-tagged controller

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #25192 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none

- [x] Add more tests

Commits
-------

b1173f3 [HttpKernel] Add a better error messages when passing a private or non-tagged controller
2017-11-30 15:36:25 +01:00
Amrouche Hamza
b1173f3ea7
[HttpKernel] Add a better error messages when passing a private or non-tagged controller 2017-11-30 15:23:34 +01:00
Nicolas Grekas
8950aada3b minor #25054 [HttpKernel] add a test for FilterControllerEvents (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] add a test for FilterControllerEvents

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | no
| Fixed tickets | no <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | no

Commits
-------

b746e8a [HttpKernel] add a test for FilterControllerEvents
2017-11-30 10:33:45 +01:00
Nicolas Grekas
1b141732db [VarDumper] Dont use empty(), it chokes on eg GMP objects 2017-11-30 10:28:49 +01:00
Nicolas Grekas
8c5eeada31 bug #25217 [Dotenv] Changed preg_match flags from null to 0 (deekthesqueak)
This PR was merged into the 3.3 branch.

Discussion
----------

[Dotenv] Changed preg_match flags from null to 0

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

I came across this bug while using HHVM in PHP7 mode. The flag should be changed to match type in function signature and bring it in line with other uses of [preg_match](https://secure.php.net/manual/en/function.preg-match.php) (https://github.com/symfony/dotenv/blob/3.3/Dotenv.php#L149)

Applicable to 3.3, 3.4, 4.0

Commits
-------

b0d297b [Dotenv] Changed preg_match flags from null to 0
2017-11-30 09:30:54 +01:00
Derek Bonner
b0d297b962 [Dotenv] Changed preg_match flags from null to 0 2017-11-29 20:22:22 -08:00
Nicolas Grekas
d90a3b50d4 bug #25180 [DI] Fix circular reference when using setters (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix circular reference when using setters

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

I did not manage to make a reproducing test case, yet @deguif provided me an app that I could play with to debug and fix.

Commits
-------

de5eecc [DI] Fix circular reference when using setters
2017-11-29 17:42:20 +01:00
Nicolas Grekas
ad3ddebf90 bug #25204 [DI] Clear service reference graph (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Clear service reference graph

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

Spotted while playing with the container: we keep this graph in memory even it its stale already.
Clearing it also leave circular refs for the php garbage collector, better clean ourselves.

Commits
-------

2744b41 [DI] Clear service reference graph
2017-11-29 17:40:14 +01:00
Nicolas Grekas
de5eecc5fa [DI] Fix circular reference when using setters 2017-11-29 15:34:00 +01:00
Fabien Potencier
5cb6c93f5b minor #25205 [HttpKernel] Fix race condition when clearing old containers (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix race condition when clearing old containers

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

Missed in #25190: when two concurrent requests create the new container concurrently, the last one would drop the old container files, because the first one just created the `*.legacyContainer` file.

Commits
-------

9d553f533f [HttpKernel] Fix race condition when clearing old containers
2017-11-29 05:36:35 -08:00
Christian Flothmann
f74ecedd0b Merge branch '3.3' into 3.4
* 3.3:
  [DI] Fix infinite loop in InlineServiceDefinitionsPass
  Do not cache cache attributes if `attributes` is in the context
  Test that it do not remove the new flashes when displaying the existing ones
  [HttpFoundation] AutExpireFlashBag should not clear new flashes
  [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed
  [DI] Fix tracking of env vars in exceptions
  [Form] Don't rely on  if http-foundation isn't in FileType
  Fix merge
  substitute aliases in inline mappings
  added ability for substitute aliases when mapping in YAML is on single line
  [Console] Fix global console flag when used in chain
2017-11-29 14:28:14 +01:00
Fabien Potencier
0d433cda7c minor #25207 [HttpKernel] remove upgrade instructions for kernel.root_dir (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] remove upgrade instructions for kernel.root_dir

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

Commits
-------

9897da4c02 remove upgrade instructions for kernel.root_dir
2017-11-29 05:24:40 -08:00
Christian Flothmann
9897da4c02 remove upgrade instructions for kernel.root_dir 2017-11-29 14:05:31 +01:00
Christian Flothmann
b4afeb2e81 Merge branch '2.8' into 3.3
* 2.8:
  Test that it do not remove the new flashes when displaying the existing ones
  [HttpFoundation] AutExpireFlashBag should not clear new flashes
  [Form] Don't rely on  if http-foundation isn't in FileType
  Fix merge
  substitute aliases in inline mappings
  added ability for substitute aliases when mapping in YAML is on single line
  [Console] Fix global console flag when used in chain
2017-11-29 13:25:49 +01:00
Amrouche Hamza
d84b47fe9d
[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice 2017-11-29 10:42:06 +01:00
Nicolas Grekas
1941a78922 Merge branch '2.7' into 2.8
* 2.7:
  Test that it do not remove the new flashes when displaying the existing ones
  [HttpFoundation] AutExpireFlashBag should not clear new flashes
  [Form] Don't rely on  if http-foundation isn't in FileType
  substitute aliases in inline mappings
  added ability for substitute aliases when mapping in YAML is on single line
  [Console] Fix global console flag when used in chain
2017-11-29 10:33:18 +01:00
Nicolas Grekas
85223d373b bug #25203 [DI] Fix infinite loop in InlineServiceDefinitionsPass (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix infinite loop in InlineServiceDefinitionsPass

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

When a non-shared is involved in a setter-circular loop, the pass enters an infinite loop right now.

Commits
-------

b988aa7 [DI] Fix infinite loop in InlineServiceDefinitionsPass
2017-11-29 10:21:33 +01:00
Nicolas Grekas
9d553f533f [HttpKernel] Fix race condition when clearing old containers 2017-11-29 10:08:48 +01:00
Nicolas Grekas
2744b41c83 [DI] Clear service reference graph 2017-11-29 09:18:28 +01:00
Nicolas Grekas
b988aa7c59 [DI] Fix infinite loop in InlineServiceDefinitionsPass 2017-11-29 09:04:31 +01:00
Fabien Potencier
020d78a65b bug #25185 [Serializer] Do not cache attributes if attributes in context (sroze)
This PR was merged into the 3.3 branch.

Discussion
----------

[Serializer] Do not cache attributes if `attributes` in context

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

Caching attributes based on the class works only when these attributes are not overwritten. This disables the cache when they are.

To me, this `extractAttributes` method should actually be a `AttributeResolver` dependency that can be decorated using different caching strategies I'd say but... that's a much bigger refactoring that needs more reflection with @dunglas.

Commits
-------

6e87382bfa Do not cache cache attributes if `attributes` is in the context
2017-11-28 18:30:17 -08:00
Fabien Potencier
1f14f4d836 bug #25190 [HttpKernel] Keep legacy container files for concurrent requests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Keep legacy container files for concurrent requests

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

Because concurrent requests might still be using them,
old container files should not be removed immediately,
but on a next dump of the container.

Commits
-------

ee3b6fe642 [HttpKernel] Keep legacy container files for concurrent requests
2017-11-28 18:27:08 -08:00
Fabien Potencier
e2c608ae6b bug #25182 [HttpFoundation] AutExpireFlashBag should not clear new flashes (Simperfit, sroze)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] AutExpireFlashBag should not clear new flashes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #9318
| License       | MIT
| Doc PR        | none

I feel like very happy ! :)
But don't worry I'm.

![img_2826](https://user-images.githubusercontent.com/3451634/33304006-99d44f38-d406-11e7-93f2-4dbc19891299.jpg)

Commits
-------

706201efe4 Test that it do not remove the new flashes when displaying the existing ones
7fe3fe8245 [HttpFoundation] AutExpireFlashBag should not clear new flashes
2017-11-28 17:55:34 -08:00
Nicolas Grekas
ee3b6fe642 [HttpKernel] Keep legacy container files for concurrent requests 2017-11-28 14:26:26 +01:00
Samuel ROZE
6e87382bfa
Do not cache cache attributes if attributes is in the context 2017-11-28 12:04:06 +00:00
Samuel ROZE
706201efe4
Test that it do not remove the new flashes when displaying the existing ones 2017-11-28 08:49:55 +00:00
Amrouche Hamza
7fe3fe8245
[HttpFoundation] AutExpireFlashBag should not clear new flashes 2017-11-28 06:31:17 +01:00
Fabien Potencier
3c8ff5ea83 bug #25174 [Translation] modify definitions only if the do exist (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] modify definitions only if the do exist

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

If the `TranslatorPass` is used an application without the Console
component, the commands will not be registered. Thus, their service
definitions must not be modified.

Commits
-------

eab90ef1cf modify definitions only if the do exist
2017-11-27 14:17:52 -08:00
Fabien Potencier
34b0ecab15 minor #25176 [HttpKernel] Better handling of legacy cache (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Better handling of legacy cache

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

Even if this is edge case, it should improve DX when moving to 3.4 (I already experienced this issue myself :) )

Commits
-------

3a873f8877 [HttpKernel] Better handling of legacy cache
2017-11-27 14:15:54 -08:00
Fabien Potencier
b568e16d8f bug #25179 [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24634#discussion_r153192689 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Do we need a `"symfony/yaml": "<3.2"` conflict here (the version used in `require-dev`)? Otherwise I'll re-introduce the `!defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')` check instead.

Commits
-------

a44f8a5b1a [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed
2017-11-27 14:13:48 -08:00
Maxime Steinhausser
a44f8a5b1a [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed 2017-11-27 18:35:30 +01:00
Nicolas Grekas
3a873f8877 [HttpKernel] Better handling of legacy cache 2017-11-27 16:08:42 +01:00
Christian Flothmann
eab90ef1cf modify definitions only if the do exist
If the `TranslatorPass` is used an application without the Console
component, the commands will not be registered. Thus, their service
definitions must not be modified.
2017-11-27 15:23:00 +01:00
Nicolas Grekas
a19d1e5d15 bug #25160 [DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist (dunglas)
This PR was squashed before being merged into the 3.4 branch (closes #25160).

Discussion
----------

[DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  |  no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Currently, if you just run the following commands:

```
composer create-project -s beta symfony/skeleton:^3.4 test
composer req orm
```

You get the following error:

```
In UniqueEntityValidator.php line 27:

  [ReflectionException]
  Class Symfony\Component\Validator\ConstraintValidator not found
```

`UniqueEntityValidator` is in the bridge, but it's parent class is in the validator (that is not installed by default). The hot path optimization feature (enabled by default) uses reflection, and the reflection API throws an exception in this specific case.

This PR fixes the error.

Commits
-------

6e622c6 [DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist
2017-11-27 10:49:37 +01:00
Kévin Dunglas
6e622c668b [DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist 2017-11-27 10:49:34 +01:00
Nicolas Grekas
8555c0b550 bug #25163 [DI] Fix tracking of env vars in exceptions (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix tracking of env vars in exceptions

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

Fixes the bad exception message reported in the linked issue (regression introduced in v3.3.7).

Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/25163/files?w=1).

Commits
-------

73f1ac5 [DI] Fix tracking of env vars in exceptions
2017-11-27 10:48:57 +01:00