Commit Graph

33792 Commits

Author SHA1 Message Date
Fabien Potencier
327185ffff bug #25306 [Form][TwigBridge] Fix collision between view properties and form fields (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form][TwigBridge] Fix collision between view properties and form fields

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

Require https://github.com/symfony/symfony/pull/25236 merged in 3.4

Commits
-------

c330965cfb Fix collision between view properties and form fields
2017-12-04 10:18:07 -08:00
Fabien Potencier
9dff16479a Merge branch '3.3' into 3.4
* 3.3:
  [DI] Fix deep-inlining of non-shared refs
  parse newlines in quoted multiline strings
  Fix collision between view properties and form fields
2017-12-04 10:15:22 -08:00
Fabien Potencier
561767ce65 Merge branch '2.8' into 3.3
* 2.8:
  Fix collision between view properties and form fields
2017-12-04 10:09:49 -08:00
Fabien Potencier
c610a32b4b Merge branch '2.7' into 2.8
* 2.7:
  Fix collision between view properties and form fields
2017-12-04 10:08:18 -08:00
Fabien Potencier
9524396712 bug #25236 [Form][TwigBridge] Fix collision between view properties and form fields (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form][TwigBridge] Fix collision between view properties and form fields

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

This introduce a new Twig test function `rootform` that guarantee the right access to the `parent` property of the form view. The rest of the properties (`vars` and `children`) are not used at least inside Symfony repo.

I've chosen this solution because it doesn't [affect the design of the form view class/interface](https://github.com/symfony/symfony/pull/19492/files#diff-f60b55ea46e40b9c4475a1bd361f6940R168) and because [the problem happen only on Twig](fd98722d15/lib/Twig/Extension/Core.php (L1439-L1447)).

More details about the problem here:
* https://github.com/symfony/symfony/issues/24892
* https://github.com/symfony/symfony/pull/19492
* https://github.com/symfony/symfony/pull/23649#discussion_r129244236

_if this is approved_ we should update also:
* [`foundation_5_layout.html.twig`](336600857b/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig (L321-L326)) in `3.3` (done in https://github.com/symfony/symfony/pull/25305)
* [`bootstrap_4_layout.html.twig`](76d356f36a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig (L176)) in `3.4` (done in https://github.com/symfony/symfony/pull/25306)

Commits
-------

8505894988 Fix collision between view properties and form fields
2017-12-04 10:06:36 -08:00
Fabien Potencier
73ff764bd9 bug #25312 [DI] Fix deep-inlining of non-shared refs (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix deep-inlining of non-shared refs

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

Non-shared definitions should deep-clone their inlined non-shared definitions.

Commits
-------

eb2a15229a [DI] Fix deep-inlining of non-shared refs
2017-12-04 10:00:31 -08:00
Fabien Potencier
c08602cb80 bug #25309 [Yaml] parse newlines in quoted multiline strings (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] parse newlines in quoted multiline strings

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

Commits
-------

b23b957ae9 parse newlines in quoted multiline strings
2017-12-04 09:04:06 -08:00
Fabien Potencier
8353d69ff1 bug #25313 [DI] Fix missing unset leading to false-positive circular ref (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix missing unset leading to false-positive circular ref

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

Commits
-------

17d84f6a87 [DI] Fix missing unset leading to false-positive circular ref
2017-12-04 09:00:00 -08:00
Nicolas Grekas
17d84f6a87 [DI] Fix missing unset leading to false-positive circular ref 2017-12-04 17:04:41 +01:00
Nicolas Grekas
eb2a15229a [DI] Fix deep-inlining of non-shared refs 2017-12-04 16:44:12 +01:00
Christian Flothmann
b23b957ae9 parse newlines in quoted multiline strings 2017-12-04 15:51:35 +01:00
Yonel Ceruto
c330965cfb Fix collision between view properties and form fields 2017-12-04 09:06:01 -05:00
Nicolas Grekas
0ec119be88 Merge branch '3.3' into 3.4
* 3.3:
  [SecurityBundle] Fix compat with HttpFoundation >=3.4
2017-12-04 14:34:28 +01:00
Nicolas Grekas
c9f72e2807 [SecurityBundle] Fix compat with HttpFoundation >=3.4 2017-12-04 13:50:51 +01:00
Nicolas Grekas
0b0542d45e bug #25285 [DI] Throw an exception if Expression Language is not installed (sroze)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Throw an exception if Expression Language is not installed

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

The [`PhpDumper` already has this check](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php#L1688-L1690) but it is missing here.

Commits
-------

75b21e9 Throw an exception is expression language is not installed
2017-12-04 13:20:58 +01:00
Nicolas Grekas
abd76ba4c9 Merge branch '3.3' into 3.4
* 3.3:
  Fail as early and noisily as possible
  [FrameworkBundle] Fix visibility of a test helper
  [link] clear the cache after linking
  [link] Prevent warnings when running link with 2.7
  [Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
  do not eagerly filter comment lines
  [WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml)
2017-12-04 13:17:59 +01:00
Nicolas Grekas
5b997f1f21 Merge branch '2.8' into 3.3
* 2.8:
  [FrameworkBundle] Fix visibility of a test helper
  [link] clear the cache after linking
  [link] Prevent warnings when running link with 2.7
  [Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
2017-12-04 13:17:10 +01:00
Nicolas Grekas
874d418a8f Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Fix visibility of a test helper
  [link] clear the cache after linking
  [link] Prevent warnings when running link with 2.7
  [Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
2017-12-04 13:15:49 +01:00
Nicolas Grekas
2adb67bb42 minor #24960 SCA with Php Inspections (EA Extended) (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #24960).

Discussion
----------

SCA with Php Inspections (EA Extended)

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

- Greedy regex characters set fixed
- Potential race-conditions fixed

Commits
-------

4d39a2d SCA with Php Inspections (EA Extended)
2017-12-04 13:09:04 +01:00
Vladimir Reznichenko
4d39a2d8dc SCA with Php Inspections (EA Extended) 2017-12-04 13:09:02 +01:00
Nicolas Grekas
5f5edf26f2 bug #25241 [Yaml] do not eagerly filter comment lines (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] do not eagerly filter comment lines

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

Trying to be clever by filtering commented lines inside
`getNextEmbedBlock()` does not work as expected. The `#` may as well be
part of a multi-line quoted string where it must not be treated as the
beginning of a comment. Thus, we only must ensure that a comment-like
line does not skip the process of getting the next line of the embed
block.

Commits
-------

d594038 do not eagerly filter comment lines
2017-12-04 13:05:43 +01:00
Nicolas Grekas
f056b4ef5b minor #25270 Fail as early and noisily as possible (greg0ire)
This PR was merged into the 3.3 branch.

Discussion
----------

Fail as early and noisily as possible

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

An alternative would be to use a custom error handler

Commits
-------

3bdeda0 Fail as early and noisily as possible
2017-12-04 11:36:39 +01:00
Nicolas Grekas
86b0598810 bug #25297 [Validator] Fixed the @Valid(groups={"group"}) against null exception case (vudaltsov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fixed the @Valid(groups={"group"}) against null exception case

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

When `@Valid(groups={"group"})` has non-empty groups and the value is `null`, validator throws `Cannot validate values of type "NULL" automatically. Please provide a constraint.` at `RecursiveContextualValidator:164`.

I don't really understand, why everything is okay for `@Valid()` without groups, but hope that my fix is correct anyway.

Commits
-------

56f24d0 Fixed the null value exception case.
2017-12-04 11:35:03 +01:00
Nicolas Grekas
8c27dd4851 minor #25302 [DependencyInjection] Add tests to #25264 (Jean85)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Add tests to #25264

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | adds tests for #25264
| License       | MIT

As asked by @nicolas-grekas in https://github.com/symfony/symfony/issues/25253#issuecomment-348644502, I've added a test about his PR #25264.

Commits
-------

93441c1 Add test case for #25264
2017-12-04 11:34:29 +01:00
Alessandro Lai
93441c1a85
Add test case for #25264 2017-12-04 10:23:02 +01:00
Fabien Potencier
5b8cf03dcb minor #25292 Remove rc/beta suffix from composer.json files (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove rc/beta suffix from composer.json files

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

We don't need that anymore.

Commits
-------

9fb6a88580 Remove rc/beta suffix from composer.json files
2017-12-03 17:35:40 -08:00
Valentin
56f24d08c9 Fixed the null value exception case. 2017-12-04 02:10:25 +03:00
Nicolas Grekas
9fb6a88580 Remove rc/beta suffix from composer.json files 2017-12-03 22:15:09 +01:00
Samuel ROZE
75b21e9c86
Throw an exception is expression language is not installed 2017-12-03 13:07:37 +00:00
Grégoire Paris
3bdeda048b
Fail as early and noisily as possible
Today, I tried using SYMFONY_PHPUNIT_VERSION=6 because I don't really
care about the minor version. I got lots of warnings, followed by
hard-to-understand error messages. This will silence the first warning
and will throw an exception instead.
2017-12-03 00:45:47 +01:00
Fabien Potencier
c927c481aa bug #25255 [Console][DI] Fail gracefully (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console][DI] Fail gracefully

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/flex/issues/212, #25280
| License       | MIT
| Doc PR        | -

I already experienced this issue a few times without spending time digging it:
sometimes, you call `cache:clear`, and the command quits without any output, and with 255 status code.

The reason is the `@include` in `Kernel`, which makes everything silent, especially fatal errors (thanks PHP...)
So if the to-be-removed container is broken for some fatal reason, the failure is really bad.

To fix that, here are two measures:
- use `include_once` instead of `require_once` in the dumped container: that's OK there to actually not immediately load the file, any hard failure will happen later anyway, and any soft failure will allow the `cache:clear` command to complete (like when you remove a package)
- register `Application::renderException()` as the main PHP exception handler, via `Debug::ErrorHandler` when it's available

End result when it fails:
![image](https://user-images.githubusercontent.com/243674/33494543-e1d07202-d6c3-11e7-9677-bc2ae72fbba9.png)

instead of a blank output.

Commits
-------

4a5a3f52ab [Console][DI] Fail gracefully
2017-12-02 15:04:03 -08:00
Nicolas Grekas
4a5a3f52ab [Console][DI] Fail gracefully 2017-12-02 19:20:11 +01:00
Fabien Potencier
6eedbb5660 minor #25271 [FrameworkBundle] Fix visibility of a test helper (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix visibility of a test helper

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

23b5758198 [FrameworkBundle] Fix visibility of a test helper
2017-12-02 08:24:41 -08:00
Kévin Dunglas
23b5758198
[FrameworkBundle] Fix visibility of a test helper 2017-12-02 16:57:48 +01:00
Fabien Potencier
9f1acc1b04 bug #25264 [DI] Trigger deprecation when setting a to-be-private synthetic service (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Trigger deprecation when setting a to-be-private synthetic service

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

Commits
-------

28175767d2 [DI] Trigger deprecation when setting a to-be-private synthetic service
2017-12-01 17:39:23 -08:00
Fabien Potencier
de3a25a474 minor #25257 [link] clear the cache after linking (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #25257).

Discussion
----------

[link] clear the cache after linking

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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

Clearing the cache after linking prevents fatal errors when a container already exists.

Commits
-------

05c3c81a20 [link] clear the cache after linking
2017-12-01 17:33:23 -08:00
Kévin Dunglas
05c3c81a20 [link] clear the cache after linking 2017-12-01 17:33:21 -08:00
Fabien Potencier
7f5aeb7475 bug #25258 [link] Prevent warnings when running link with 2.7 (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[link] Prevent warnings when running link with 2.7

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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

Prevent warnings when linking from 2.7 because some directories (like the Bridge/Propel1) don't contain `composer.json` files.

Commits
-------

3e7780cb90 [link] Prevent warnings when running link with 2.7
2017-12-01 17:32:35 -08:00
Nicolas Grekas
28175767d2 [DI] Trigger deprecation when setting a to-be-private synthetic service 2017-12-02 00:46:52 +01:00
Kévin Dunglas
3e7780cb90
[link] Prevent warnings when running link with 2.7 2017-12-01 20:16:54 +01:00
Fabien Potencier
9401afd031 bug #25244 [DI] Add missing deprecation when fetching private services from ContainerBuilder (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Add missing deprecation when fetching private services from ContainerBuilder

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

Commits
-------

93c0b3801c [DI] Add missing deprecation when fetching private services from ContainerBuilder
2017-12-01 09:40:17 -08:00
Fabien Potencier
5a6e2d7993 bug #24750 [Validator] ExpressionValidator should use OBJECT_TO_STRING (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] ExpressionValidator should use OBJECT_TO_STRING

…value in message

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

Commits
-------

7dac528a86 [Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
2017-12-01 09:38:10 -08:00
Amrouche Hamza
7dac528a86
[Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message 2017-12-01 18:16:29 +01:00
Nicolas Grekas
93c0b3801c [DI] Add missing deprecation when fetching private services from ContainerBuilder 2017-12-01 16:10:27 +01:00
Fabien Potencier
41e6f8ecdb minor #25250 [FrameworkBundle] Rename getDotEnvVars to getDotenvVars (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Rename getDotEnvVars to getDotenvVars

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

For consistency with #25166 :)

Commits
-------

de137d286e [FrameworkBundle] Rename getDotEnvVars to getDotenvVars
2017-12-01 06:42:02 -08:00
Roland Franssen
de137d286e
[FrameworkBundle] Rename getDotEnvVars to getDotenvVars 2017-12-01 15:32:30 +01:00
Fabien Potencier
dccc5cc1df bug #25247 [DI] Fix false-positive circular exception (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix false-positive circular exception

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

Commits
-------

adf18198f6 [DI] Fix false-positive circular exception
2017-12-01 06:08:49 -08:00
Nicolas Grekas
adf18198f6 [DI] Fix false-positive circular exception 2017-12-01 14:16:38 +01:00
Christian Flothmann
d594038ad9 do not eagerly filter comment lines
Trying to be clever by filtering commented lines inside
`getNextEmbedBlock()` does not work as expected. The `#` may as well be
part of a multi-line quoted string where it must not be treated as the
beginning of a comment. Thus, we only must ensure that a comment-like
line does not skip the process of getting the next line of the embed
block.
2017-12-01 11:59:50 +01:00
Nicolas Grekas
b9fb27cab2 bug #25226 [HttpKernel] Fix issue when resetting DumpDataCollector (Pierstoval)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix issue when resetting DumpDataCollector

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

Fixes issue when resetting the collector and no stopwatch was provided in the constructor.

By the way, current workaround is to `composer require symfony/stopwatch`, so this is not a "big blocker".

Commits
-------

159fedc [HttpKernel] Fix issue when resetting DumpDataCollector
2017-12-01 11:32:03 +01:00