Commit Graph

29275 Commits

Author SHA1 Message Date
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
Maxime Steinhausser
58fe4315ae [VarDumper] Add search keyboard shortcuts 2017-01-11 18:31:10 +01: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
Fabien Potencier
8b354785b5 bug #21232 [FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer) (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer)

| 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

When using autowiring, Symfony uses reflection to list all available classes. So, each class is loaded, and for the `ClassCacheCacheWarmer`, it means that a deprecation notice is triggered. So, I've moved it to when an instance is created instead.

Commits
-------

eb6ff9c7e3 [FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer)
2017-01-10 13:49:58 -08:00
HeahDude
3607eb3dd0 [Form] Removed unused ResolvedTypeFactory in FormFactory constructor 2017-01-10 21:49:17 +01:00
Fabien Potencier
eb6ff9c7e3 [FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer) 2017-01-10 12:32:13 -08:00
Fabien Potencier
bdd0f9d94d feature #21231 [FrameworkBundle] allow to reference files directly from kernel.root_dir (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] allow to reference files directly from kernel.root_dir

| 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        | n/a

While working on a bundleless app, I want to be able to reference a directory for routing annotations like this:

```yaml
app:
    resource: "../src/Controller/"
    type: annotation
```

but that does not work because Symfony expects a bundle resource (`@AppBundle...`) or a directory referenced from the main app `Resources` directory. But as I don't have such a directory, even using `../../src/Controller` does not work.

So, I propose to add the %kernel.root_dir% to the list of allowed directories.

By the way, we don't have the same issue with the routing annotation **file** loader as it does not use the locator for whatever reason. Should we fix it?

Commits
-------

80b61e9127 [FrameworkBundle] allowed to reference files directly from kernel.root_dir
2017-01-10 12:30:05 -08:00
Fabien Potencier
80b61e9127 [FrameworkBundle] allowed to reference files directly from kernel.root_dir 2017-01-10 11:14:57 -08:00
Fabien Potencier
4d916c63dd feature #20611 [DI] FileLoaders: Allow to explicit type to load (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] FileLoaders: Allow to explicit type to load

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

(fabbot will scream out regarding the PR fixtures)

Commits
-------

6b660c2114 [DI] FileLoaders: Allow to explicit type to load
2017-01-10 07:50:45 -08:00
Fabien Potencier
629de96792 feature #20689 [Config][FrameworkBundle] Allow to dump extension config reference sub-path (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Config][FrameworkBundle] Allow to dump extension config reference sub-path

| 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        | N/A

Same as https://github.com/symfony/symfony/pull/18940 but for the `config:dump-reference` command:

<img width="975" alt="screenshot 2016-11-29 a 19 09 04" src="https://cloud.githubusercontent.com/assets/2211145/20722577/6c9f9b98-b667-11e6-9683-9a304ff80895.PNG">

Only available for yaml, because it's the most common format when developing an end-application, and dumping a sub xml document causes some issues and raises more questions with the current `XmlReferenceDumper` implementation (namespaces, root name, ...).

Commits
-------

869bb1530b [Config][FrameworkBundle] Allow to dump extension config reference sub path
2017-01-10 07:47:15 -08: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
16d33e1fff Merge branch '3.2'
* 3.2:
  [DI] Add missing legacy group on testLegacy
  Minor tweaks
  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:32:56 +01:00
Nicolas Grekas
1fcb66d129 Merge branch '3.1' into 3.2
* 3.1:
  [DI] Add missing legacy group on testLegacy
2017-01-10 15:27:50 +01: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
80ed2c5173 Minor tweaks 2017-01-10 15:21:25 +01:00
Nicolas Grekas
783abab7ae Merge branch '3.1' into 3.2
* 3.1:
  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:14:38 +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
Maxime Steinhausser
6b660c2114 [DI] FileLoaders: Allow to explicit type to load 2017-01-10 12:54:54 +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
Maxime STEINHAUSSER
869bb1530b [Config][FrameworkBundle] Allow to dump extension config reference sub path 2017-01-09 22:03:44 +01:00
Fabien Potencier
9e6d6ba3a9 bug #21219 [DI] Fixes aliases visibility with and without defaults (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fixes aliases visibility with and without defaults

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

Commits
-------

f1cc090465 [DI] Fixes aliases visibility with and without defaults
2017-01-09 12:26:05 -08:00