Commit Graph

29102 Commits

Author SHA1 Message Date
Nicolas Grekas
fda8832c4e minor #21255 [Profiler] Fix inline dump rendering (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Profiler] Fix inline dump rendering

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

I introduced a minor rendering issue in #21109 when adding a clearfix behavior to the `pre.sf-dump` element:

|Before|After|
|-------|-----|
|
<img width="890" alt="screenshot 2017-01-12 a 19 57 34" src="https://cloud.githubusercontent.com/assets/2211145/21903782/6989eb36-d901-11e6-8f02-99c4a8356725.PNG">|<img width="892" alt="screenshot 2017-01-12 a 19 52 56" src="https://cloud.githubusercontent.com/assets/2211145/21903721/407d3bbc-d901-11e6-901b-3f5b65bee650.PNG">|

This will fix the issue by removing it, as we don't need this behavior for inline dumps.

Commits
-------

81e2641 [Profiler] Fix inline dump rendering
2017-01-13 09:45:33 +01:00
Nicolas Grekas
136a5ffc55 Merge branch '3.2'
* 3.2:
  Fix test
2017-01-12 21:17:32 +01:00
Nicolas Grekas
3d0a69e50f Fix test 2017-01-12 21:17:20 +01:00
Nicolas Grekas
c527f10b08 Merge branch '3.2'
* 3.2:
  [Profiler][Form] Fix form profiler errors profiler_dump
2017-01-12 20:46:56 +01:00
Nicolas Grekas
6ba798151e bug #21257 [Profiler][Form] Fix form profiler errors profiler_dump (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[Profiler][Form] Fix form profiler errors profiler_dump

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

|Before|After|
|-|-|
|
<img width="807" alt="screenshot 2017-01-12 a 20 12 59" src="https://cloud.githubusercontent.com/assets/2211145/21904499/323d1a38-d904-11e6-85ef-0957ef226278.PNG">|<img width="806" alt="screenshot 2017-01-12 a 20 13 38" src="https://cloud.githubusercontent.com/assets/2211145/21904500/32429710-d904-11e6-9bed-0d8e37262cd5.PNG">|

Commits
-------

207fab6 [Profiler][Form] Fix form profiler errors profiler_dump
2017-01-12 20:46:27 +01:00
Nicolas Grekas
641bb1a890 Merge branch '3.2'
* 3.2:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:30:26 +01:00
Nicolas Grekas
ec858cea91 Merge branch '3.1' into 3.2
* 3.1:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:27:47 +01:00
Nicolas Grekas
473fd3b026 Merge branch '2.8' into 3.1
* 2.8:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:26:57 +01:00
Nicolas Grekas
658a8a076c Merge branch '2.7' into 2.8
* 2.7:
  Fix getMock usage
2017-01-12 20:24:25 +01:00
Nicolas Grekas
52eeddc24e Fix getMock usage 2017-01-12 20:23:39 +01:00
Nicolas Grekas
9746314ecb Merge branch '2.7' into 2.8
* 2.7:
  Remove dead code
2017-01-12 20:21:19 +01:00
Nicolas Grekas
49fb0c033c Remove dead code 2017-01-12 20:18:32 +01:00
Nicolas Grekas
5ca27373e8 Merge branch '2.7' into 2.8
* 2.7:
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:18:05 +01:00
Maxime Steinhausser
207fab63db [Profiler][Form] Fix form profiler errors profiler_dump 2017-01-12 20:16:54 +01:00
Nicolas Grekas
566732db1f Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Add annotated validator cache test case
  Fix a typo
  [Ldap] Always have a valid connection when using the EntryManager
  [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers
2017-01-12 20:06:21 +01:00
Nicolas Grekas
2e4d87fd6e Merge branch '3.1' into 3.2
* 3.1:
  [Ldap] Always have a valid connection when using the EntryManager
2017-01-12 20:04:24 +01:00
Fabien Potencier
6fe9319e66 feature #21253 [TwigBridge][Worklow] Added a new workflow_has_place function (Padam87, lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBridge][Worklow] Added a new workflow_has_place function

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

---

This PR follow up #20781

I also increased the Coverage of the WorkflowExtension and finally I added an extra commit that is not related to clean-up 2 unused properties

Commits
-------

108c89d1cf [TwigBridge] Removed unused class property
77f820ee7c [TwigBridge][Workflow] Added more tests on WorkflowExtension
efe500da84 [TwigBridge][Workflow] Fixed code and tests
4d0cc6836f [TwigBridge][Workflow] Added workflow_has_place twig function
2017-01-12 10:57:19 -08:00
Grégoire Pineau
108c89d1cf [TwigBridge] Removed unused class property 2017-01-12 19:56:36 +01:00
Grégoire Pineau
77f820ee7c [TwigBridge][Workflow] Added more tests on WorkflowExtension 2017-01-12 19:55:06 +01:00
Grégoire Pineau
efe500da84 [TwigBridge][Workflow] Fixed code and tests 2017-01-12 19:55:06 +01:00
Adam Prager
4d0cc6836f [TwigBridge][Workflow] Added workflow_has_place twig function 2017-01-12 19:55:06 +01:00
Maxime Steinhausser
81e2641199 [Profiler] Fix inline dump rendering 2017-01-12 19:54:12 +01:00
Fabien Potencier
75de5eb8f4 bug #21243 [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers (nicolas-grekas, mpajunen)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers

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

Follow up of #21102

Commits
-------

e09dccc762 [FrameworkBundle] Add annotated validator cache test case
c60009eae8 [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers
2017-01-12 10:52:44 -08: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
bcab8b8ac8 bug #21248 [FrameworkBundle] Prevent an error when the console component isn't installed (dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Prevent an error when the console component isn't installed

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

Finish #19443. Alternative to #21246.

Commits
-------

ab133caa8c [FrameworkBundle] Prevent an error when the console component isn't installed
2017-01-12 10:31:45 -08:00
Fabien Potencier
90891317eb feature #21234 Add a new Dotenv component (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add a new Dotenv component

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

This introduces a new Dotnv Component that manages `.env` files. Read the referenced doc PR above for more information about usage:

But here, I want to explain the rationale behind creating such a component instead of reusing an existing one.

 * First, this version only implements what you can do in a "real" bash shell script (which is what a `.env` really is): so **no value validation** for instance (and anyway, an env var value is always a string). That's important as in production, we should use real env variables, and we don't have validation for them there;

 * It allows to only parse a file without populating the env variables (we have 3 stages: `load` `parse` and `populate`);

 * Strict implementation of what you can do in a `.env` file, same behavior as bash ($VAR and ${VAR} are supported for instance, executing commands as well);

 * Great error messages: I spent a lot of time being sure that error reporting is top notch;

 * Clean, simple, and straightforward code (small public API);

 * It only does `.env` management, there is no uneeded abstractions like being able to add an env variable directly (just use `putenv`);

There are some unimplemented features as I don't think they are needed and would increase the complexity of the code: several concatenated strings `FOO='foo'"bar"` for instance.

Commits
-------

5a6be8ae9c [Dotenv] added the component
2017-01-12 10:01:47 -08:00
Fabien Potencier
5a6be8ae9c [Dotenv] added the component 2017-01-12 08:39:44 -08:00
Nicolas Grekas
7ba3bc6867 minor #21250 Fix a typo (GuilhemN)
This PR was merged into the 3.2 branch.

Discussion
----------

Fix a typo

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

<!--
- 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.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

2dcb22e Fix a typo
2017-01-12 17:37:52 +01:00
Mikael Pajunen
e09dccc762 [FrameworkBundle] Add annotated validator cache test case 2017-01-12 17:32:18 +01:00
Guilhem N
2dcb22e68e Fix a typo 2017-01-12 17:27:24 +01:00
Fabien Potencier
a99538340d feature #20861 Add a --show-arguments flag to the debug:container command (Cydonia7)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add a --show-arguments flag to the debug:container command

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

This PR adds a `--show-arguments` flag to the `debug:container` command that shows arguments in the services in the different available formats.

(Ping @dunglas)

Commits
-------

5c151d0439 Add a --show-arguments flag to the container debug command
2017-01-12 08:07:31 -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
Kévin Dunglas
ab133caa8c
[FrameworkBundle] Prevent an error when the console component isn't installed 2017-01-12 15:52:48 +01: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
Thomas Royer
5c151d0439 Add a --show-arguments flag to the container debug command 2017-01-12 13:51:04 +01:00
Nicolas Grekas
c60009eae8 [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers 2017-01-12 12:00:26 +01:00
Fabien Potencier
7aeb31e78d feature #21223 [DI] Deprecate case insentivity of service identifiers (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Deprecate case insentivity of service identifiers

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | minor (see UPGRADE note)
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #21193
| License       | MIT
| Doc PR        | -

As discussed in linked RFC.

Commits
-------

d08f1101df [DI] Deprecate case insentivity of service identifiers
2017-01-11 13:31:22 -08:00
Fabien Potencier
df876b3044 feature #20887 [Form] DateIntervalType: Allow to configure labels & enhance form theme (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] DateIntervalType: Allow to configure labels & enhance form theme

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (unless someone relies on this non themed type)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | Should document the new `labels` option

I just realized by using it for last fixes in #20886 and #20877 that this type was not really themed:

### before

<img width="861" alt="screenshot 2016-12-13 a 00 54 35" src="https://cloud.githubusercontent.com/assets/2211145/21121792/c589d27a-c0ce-11e6-8368-a396fda3bc7a.PNG">

At least labels should appear, but this also means being able to change them (thus the new `labels` option).

I think the form themes should provide a functional & minimalistic integration like this:

### after

<img width="862" alt="screenshot 2016-12-13 a 00 54 17" src="https://cloud.githubusercontent.com/assets/2211145/21121814/d9c4ead6-c0ce-11e6-94e1-41e6c14884a7.PNG">

---
(On screenshots above, I've only added a css rule to remove the 100% width of the `.table` class. See https://github.com/symfony/symfony/pull/20887#discussion_r92069557)

Commits
-------

bfd9e50bbb [Form] DateIntervalType: Allow to configure labels & enhance form theme
2017-01-11 11:11:51 -08:00
Fabien Potencier
294a8770b7 feature #19443 [Console] Move AddConsoleCommandPass from FrameworkBundle to Console. (bcremer)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console] Move AddConsoleCommandPass from FrameworkBundle to Console.

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

Commits
-------

7743989675 Move AddConsoleCommandPass from FrameworkBundle to Console.
2017-01-11 10:30:20 -08: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
d08f1101df [DI] Deprecate case insentivity of service identifiers 2017-01-11 16:25:44 +01:00
Nicolas Grekas
5441e9bc90 [FrameworkBundle] Fix relative paths used as cache keys 2017-01-11 16:18:12 +01:00
Benjamin Cremer
7743989675 Move AddConsoleCommandPass from FrameworkBundle to Console. 2017-01-11 13:05:48 +01:00
Fabien Potencier
cbecfc3d74 minor #21233 [Form] Removed unused ResolvedTypeFactory in FormFactory constructor (HeahDude)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] Removed unused ResolvedTypeFactory in FormFactory constructor

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

____
This PR just removes some legacy code from 2.x.

Commits
-------

3607eb3dd0 [Form] Removed unused ResolvedTypeFactory in FormFactory constructor
2017-01-10 13:52:26 -08:00