Commit Graph

27924 Commits

Author SHA1 Message Date
Grégoire Pineau 7f15bc39ea [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
The test suite does not pass locally because I use a custom
file_link_format. I do it because it works everywhere.

Then, Symfony tries to read this value before the default one.
We could use ini_set before the test but unfortunatelly there are no way
to define the "cfg_var". For recall, get_cfg_var allows to return the
configuration value even if the extension is not loaded. And again it's
my case: I don't enable xdebug to have better performance.
2017-01-12 19:58:07 +01:00
Fabien Potencier 5cf600dfbd bug #21218 [Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only (magnetik)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only

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

The `DateTimeToLocalizedStringTransformer` when used with a pattern that have only date (in `DateType` for instance) does not convert the result in the desired output

Reproduction steps:
- Use `DateType` in a form
- Set the `model_timezone` to `Pacific/Tahiti`, having default timezone to `Europe/Berlin`.
- Enter the date `2017-01-10`
- Submit the form
- Notice that the received data is `2017-01-10 00:00 Europe/Berlin`, whereas it should be `2017-01-10 11:00 Europe/Berlin`

Commits
-------

031d8c2c8b [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
2017-01-12 10:42:17 -08:00
Fabien Potencier 5c68c69da1 bug #20605 [Ldap] Always have a valid connection when using the EntryManager (bobvandevijver)
This PR was submitted for the 3.2 branch but it was merged into the 3.1 branch instead (closes #20605).

Discussion
----------

[Ldap] Always have a valid connection when using the EntryManager

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

The connection might be `null` when calling the `getEntryManager` function as it uses the `$this->connection` instead of retrieved it from it's own method which checks (and constructs if necessary) it first.

Commits
-------

7775ec210f [Ldap] Always have a valid connection when using the EntryManager
2017-01-12 07:53:09 -08:00
Bob van de Vijver 7775ec210f [Ldap] Always have a valid connection when using the EntryManager 2017-01-12 07:53:08 -08:00
Baptiste Lafontaine 031d8c2c8b [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date 2017-01-12 15:37:51 +01:00
Nicolas Grekas d7bc68a3ed bug #21104 [FrameworkBundle] fix IPv6 address handling in server commands (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] fix IPv6 address handling in server commands

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21039#discussion_r93915788
| License       | MIT
| Doc PR        |

This fixes https://github.com/symfony/symfony/pull/21039#discussion_r93915788 as reported by @sstok for the existing commands by backporting @fabpot's patch from #21039.

Commits
-------

2bb4713 fix IPv6 address handling in server commands
2017-01-12 14:01:00 +01:00
Nicolas Grekas 4769ca2164 bug #20793 [Validator] Fix caching of constraints derived from non-serializable parents (uwej711)
This PR was squashed before being merged into the 2.7 branch (closes #20793).

Discussion
----------

[Validator] Fix caching of constraints derived from non-serializable parents

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

This change allows to still cache constraints even when an uncachable constraint (i.e. Callback)
is added to a parent class at runtime.

This is achived by caching only the constraints that are loaded for the class in question only
and merging parent and interface constraints after reading from cache.

Commits
-------

9dd6b0c [Validator] Fix caching of constraints derived from non-serializable parents
2017-01-12 13:52:00 +01:00
Uwe Jäger 9dd6b0cf64 [Validator] Fix caching of constraints derived from non-serializable parents 2017-01-12 13:51:22 +01:00
Fabien Potencier 17ce5f55d1 bug #19586 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account (wesleylancel)
This PR was squashed before being merged into the 2.7 branch (closes #19586).

Discussion
----------

[TwigBundle] Fix bug where namespaced paths don't take parent bundles in account

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

Currently namespaced paths for templates such as `{% extends '@App/Layout/layout.html.twig' %}` do not work with bundles that have overruled templates using the `getParent()` method in another bundle. See attached ticket. This change prepends the path of the bundle implementing `getParent()` to the paths of the namespace of bundle returned as a parent.

Commits
-------

0c77ce2355 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
2017-01-11 10:19:59 -08:00
Wesley Lancel 0c77ce2355 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account 2017-01-11 10:19:56 -08:00
Fabien Potencier 1c6dfce018 bug #21237 [FrameworkBundle] Fix relative paths used as cache keys (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix relative paths used as cache keys

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

This bug fix is particularly important on 3.2, where the generated "templates.php" does contain relative paths. This turned out to generate a fatal error on our setup, because of non-normalized twig-cache keys. See also https://github.com/twigphp/Twig/pull/2354
As a bonus, this saves us a copy-on-write on PHP 7.

Commits
-------

5441e9bc90 [FrameworkBundle] Fix relative paths used as cache keys
2017-01-11 08:27:33 -08:00
Nicolas Grekas 5441e9bc90 [FrameworkBundle] Fix relative paths used as cache keys 2017-01-11 16:18:12 +01:00
Fabien Potencier f83ad56b1b bug #21183 [Validator] respect groups when merging constraints (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] respect groups when merging constraints

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

Commits
-------

9a60057f42 respect groups when merging constraints
2017-01-10 07:40:08 -08:00
Nicolas Grekas 027d58869f Merge branch '2.8' into 3.1
* 2.8:
  [DI] Add missing legacy group on testLegacy
2017-01-10 15:27:30 +01:00
Nicolas Grekas a351c24e6c Merge branch '2.7' into 2.8
* 2.7:
  [DI] Add missing legacy group on testLegacy
2017-01-10 15:27:01 +01:00
Nicolas Grekas c5847696ea [DI] Add missing legacy group on testLegacy 2017-01-10 15:26:05 +01:00
Nicolas Grekas 15ff7f9195 Merge branch '2.8' into 3.1
* 2.8:
  Fix merge
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:09:41 +01:00
Nicolas Grekas 87db587fa6 Fix merge 2017-01-10 15:07:18 +01:00
Nicolas Grekas 144eb54fcd Merge branch '2.7' into 2.8
* 2.7:
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:03:07 +01:00
Nicolas Grekas f03073c103 bug #21179 [TwigBundle] Fixing regression in TwigEngine exception handling (Bertalan Attila)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fixing regression in TwigEngine exception handling

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

Fixing regression after #20831 in TwigEngine exception handling.

Commits
-------

390cb33 Fixing regression in TwigEngine exception handling.
2017-01-10 14:51:20 +01:00
Nicolas Grekas d18c2cadfc minor #21226 Fix Container and PhpDumper test inaccuracies (nikita2206)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix Container and PhpDumper test inaccuracies

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

Stumbled upon and fixed some minor inaccuracies in tests for DI container, they might have lead to undetected changes of `Container`'s behavior

Commits
-------

24b93cc Fix Container and PhpDumper test inaccuracies
2017-01-10 14:43:59 +01:00
Nicolas Grekas e355739b83 minor #21225 [DI] Dont share service when no id provided (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Dont share service when no id provided

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

Commits
-------

814f633 [DI] Dont share service when no id provided
2017-01-10 14:43:16 +01:00
Nicolas Grekas 814f63390d [DI] Dont share service when no id provided 2017-01-10 14:32:11 +01:00
Nikita Nefedov 24b93cc75c Fix Container and PhpDumper test inaccuracies 2017-01-10 14:19:58 +03:00
Christian Flothmann 9a60057f42 respect groups when merging constraints 2017-01-10 10:32:28 +01:00
Fabien Potencier 44f6a8c6b1 bug #21220 [DI] Fix missing new line after private alias (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix missing new line after private alias

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21219#discussion_r95220565
| License       | MIT
| Doc PR        | N/A

Without this change, the output is:

```yml
# [...]
alias_for_foo: '@foo'
another_alias_for_foo:
    alias: foo
    public: false    another_third_alias_for_foo: '@foo' # <--- missing new line after `public: false`
```

(this is tested by the `CrossCheckTest` but there is no fixture file to update (automatically dumped and removed by the test case))

Commits
-------

101a165d0d [DI] Fix missing new line after private alias
2017-01-09 12:23:12 -08:00
Maxime Steinhausser 101a165d0d [DI] Fix missing new line after private alias 2017-01-09 19:49:53 +01:00
Fabien Potencier e9f2512c04 bug #21211 Classloader tmpname (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

Classloader tmpname

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

In dev env:

from:

> Notice: tempnam(): file created in the system's temporary directory

to:

> Failed to write cache file "/var/www/html/var/cache/dev/classes.php".

Commits
-------

3c887da4f3 [ClassLoader] Throw an exception if the cache is not writeable
2017-01-09 06:56:46 -08:00
Grégoire Pineau 3c887da4f3 [ClassLoader] Throw an exception if the cache is not writeable 2017-01-09 15:44:50 +01:00
Bertalan Attila 390cb335fa Fixing regression in TwigEngine exception handling. 2017-01-09 10:33:51 +01:00
Fabien Potencier 789111c52a Merge branch '2.8' into 3.1
* 2.8:
  [TwigBundle] fixed usage when Templating is not installed
  [Validator] Check cascasdedGroups for being countable
  [Filesystem] Check that the directory is writable after created it in dumpFile()
  [HttpFoundation] Improved set cookie header tests
  [Console] increased code coverage of Output classes
  [Profiler][VarDumper] Fix minor color issue & duplicated selector
2017-01-08 12:43:43 -08:00
Fabien Potencier 4546377125 Merge branch '2.7' into 2.8
* 2.7:
  [TwigBundle] fixed usage when Templating is not installed
  [Validator] Check cascasdedGroups for being countable
  [Filesystem] Check that the directory is writable after created it in dumpFile()
  [HttpFoundation] Improved set cookie header tests
  [Console] increased code coverage of Output classes
2017-01-08 12:43:03 -08:00
Fabien Potencier 6bd7840169 bug #21205 [TwigBundle] fixed usage when Templating is not installed (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] fixed usage when Templating is not installed

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | bug introduced in #20799
| License       | MIT
| Doc PR        | n/a

In #20799, the decoupling of the Templating definition means that the `twig.loader.filesystem` is not always defined, but used in Extension. So, this PR does the opposite as what was done before. Use `twig.loader.native_filesystem` by default and copy paths to `twig.loader.filesystem` when templating is used.

/cc @xabbuh

Commits
-------

6aa98d163d [TwigBundle] fixed usage when Templating is not installed
2017-01-08 12:42:44 -08:00
Fabien Potencier 6aa98d163d [TwigBundle] fixed usage when Templating is not installed 2017-01-08 12:32:10 -08:00
Fabien Potencier 23294e59ca bug #21155 [Validator] Check cascasdedGroups for being countable (scaytrase)
This PR was squashed before being merged into the 2.7 branch (closes #21155).

Discussion
----------

[Validator] Check cascasdedGroups for being countable

Prevents notice for PHP 7.2

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

Just repeated for this place https://github.com/symfony/symfony/pull/20859
Waiting travis to fill in the `Tests pass` field

`cascasdedGroups` can be null at this point (according to failures and phpdoc)

Commits
-------

8fa45a130b [Validator] Check cascasdedGroups for being countable
2017-01-08 08:16:04 -08:00
Pavel Batanov 8fa45a130b [Validator] Check cascasdedGroups for being countable 2017-01-08 08:16:02 -08:00
Fabien Potencier 41bbe5c7f1 minor #21201 [Cache] Add changelog (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Add changelog

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

Commits
-------

d087d0ffea [Cache] Add changelog
2017-01-08 08:03:15 -08:00
Fabien Potencier e18f47f8d5 bug #21200 [Filesystem] Check that directory is writable after created it in dumpFile() (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] Check that directory is writable after created it in dumpFile()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20612#discussion_r95077788
| License       | MIT
| Doc PR        | n/a

In case permissions have been changed meanwhile

Commits
-------

dbc4148535 [Filesystem] Check that the directory is writable after created it in dumpFile()
2017-01-08 07:59:38 -08:00
Nicolas Grekas d087d0ffea [Cache] Add changelog 2017-01-08 14:57:38 +01:00
Robin Chalas dbc4148535
[Filesystem] Check that the directory is writable after created it in dumpFile() 2017-01-08 13:55:49 +01:00
Fabien Potencier 182dd8f7e6 minor #20972 [HttpFoundation] Improved set cookie header tests (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #20972).

Discussion
----------

[HttpFoundation] Improved set cookie header tests

| Q             | A
| ------------- | ---
| Branch?       | 2.7 (already in master)
| 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-->

Separated from #20569

Commits
-------

05bce71d7a [HttpFoundation] Improved set cookie header tests
2017-01-06 09:20:46 -08:00
Roland Franssen 05bce71d7a [HttpFoundation] Improved set cookie header tests 2017-01-06 09:20:45 -08:00
Fabien Potencier c36f25f038 bug #21165 [Serializer] int is valid when float is expected when deserializing JSON (dunglas)
This PR was squashed before being merged into the 3.1 branch (closes #21165).

Discussion
----------

[Serializer] int is valid when float is expected when deserializing JSON

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

JSON only has a Number type corresponding to both `int` and `float` PHP types.
PHP's `json_encode`, JavaScript's `JSON.stringify`, Go's `json.Marshal` as well as most other JSON encoders convert floating-point numbers like `12.0` to `12` (the decimal part is dropped when possible).
PHP's `json_decode` automatically converts Numbers without a decimal part to integers.

Actually, the Serializer rejects integers when a float is expected, this PR fixes this behavior when denormalizing JSON-based formats.

Port of api-platform/core#714.

/cc @gorghoa @Shine-neko

Commits
-------

4125455775 [Serializer] int is valid when float is expected when deserializing JSON
2017-01-06 07:11:28 -08:00
Kévin Dunglas 4125455775 [Serializer] int is valid when float is expected when deserializing JSON 2017-01-06 07:11:08 -08:00
Nicolas Grekas 1038221d51 minor #21124 [Console] increased code coverage of Output classes (ShinDarth)
This PR was squashed before being merged into the 2.7 branch (closes #21124).

Discussion
----------

[Console] increased code coverage of Output classes

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

This PR increases the coverage of Output classes of the Console component from 80.81% to 94.95%

Commits
-------

ab4ba23 [Console] increased code coverage of Output classes
2017-01-06 14:13:12 +01:00
ShinDarth ab4ba23931 [Console] increased code coverage of Output classes 2017-01-06 14:13:10 +01:00
Nicolas Grekas 5518f6a2d0 minor #21151 [Profiler][VarDumper] Fix minor color issue & duplicated selector (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[Profiler][VarDumper] Fix minor color issue & duplicated selector

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

While working on #21109, I spotted this minor issue with `sf-dump-const` and `.sf-dump-ref`:

| Before | After |
| --- | --- |
|<img width="276" alt="screenshot 2017-01-03 a 20 13 55" src="https://cloud.githubusercontent.com/assets/2211145/21619779/7e1e347e-d1f1-11e6-9d84-fbb1d5d6b1fa.PNG">| <img width="275" alt="screenshot 2017-01-03 a 20 14 04" src="https://cloud.githubusercontent.com/assets/2211145/21619786/86dde5dc-d1f1-11e6-8b13-dcfc5abe466a.PNG">|

Commits
-------

b282076 [Profiler][VarDumper] Fix minor color issue & duplicated selector
2017-01-06 11:12:29 +01:00
Nicolas Grekas d7928eac87 minor #21171 Added missing headers in fixture files (iltar)
This PR was merged into the 3.1 branch.

Discussion
----------

Added missing headers in fixture files

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

The headers were missing in a few files as mentioned in https://github.com/symfony/symfony/pull/21164#discussion_r94669787

Commits
-------

c9c2474 Added missing headers in fixture files
2017-01-06 10:30:29 +01:00
Iltar van der Berg c9c2474a2c Added missing headers in fixture files 2017-01-06 08:41:29 +01:00
Nicolas Grekas e2b11b4207 bug #21166 [Cache] Fix order of writes in ChainAdapter (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Fix order of writes in ChainAdapter

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

This is of importance in race situations: writes should happen on less volatile backend first so that.

Commits
-------

df552af [Cache] Fix order of writes in ChainAdapter
2017-01-05 18:42:20 +01:00