Commit Graph

27122 Commits

Author SHA1 Message Date
Nicolas Grekas
cf4eb4602a [HttpFoundation] minor session-related fix 2017-11-10 08:36:19 +01:00
Nicolas Grekas
1f5e3538d8 [Cache][Lock] Add RedisProxy for lazy Redis connections 2017-11-10 08:19:32 +01:00
Fabien Potencier
deb499ebaf bug #24837 [TwigBridge] [Bootstrap 4] Fix validation error design for expanded choiceType (ostrolucky)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] [Bootstrap 4] Fix validation error design for expanded choiceType

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

Unfortunately I didn't test https://github.com/symfony/symfony/pull/24802 with expanded option set to true, sorry about that. Without this fix, it applies form error style twice.

Before:
![screenshot from 2017-11-06 10 31 55](https://user-images.githubusercontent.com/496233/32434235-c13c02f8-c2dd-11e7-97da-6bfa312c5825.png)

After:
![screenshot from 2017-11-06 10 32 40](https://user-images.githubusercontent.com/496233/32434252-d30c2224-c2dd-11e7-86d6-fd06af3ef753.png)

Commits
-------

39083a2067 [TwigBridge] [Bootstrap 4] Fix validation error design for expanded choiceType
2017-11-09 11:24:47 -08:00
Gabriel Ostrolucký
39083a2067 [TwigBridge] [Bootstrap 4] Fix validation error design for expanded choiceType 2017-11-09 20:22:51 +01:00
Maxime Steinhausser
7b3a641acc [FrameworkBundle] Specifically inject the debug dispatcher in the collector 2017-11-09 18:29:09 +01:00
Fabien Potencier
a3e0e49094 minor #24872 [DI] Add "container.hot_path" tag to flag the hot path and inline related services (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Add "container.hot_path" tag to flag the hot path and inline related services

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

This PR is the result of my quest to squeeze some performance out of 3.4/4.0.

It builds on two ideas:
- a new `container.inline` tag that identifies the services that are *always* needed. This tag is only applied to a very short list of bootstrapping services (`router`, `event_dispatcher`, `http_kernel` and `request_stack` only). Then, it is propagated to all dependencies of these services, with a special case for event listeners, where only listed events are propagated to their related listeners.
- replacing the PHP autoloader by plain inlined `require_once` in generated service factories, with the benefit of completely bypassing the autoloader for services and their class hierarchy.

The end result is significant, even on a simple Hello World.
Here is the Blackfire profile, results are consistent with `ab` benchmarks:

https://blackfire.io/profiles/compare/b5fa5ef0-755c-4967-b990-572305f8f381/graph

![capture du 2017-11-08 16-54-28](https://user-images.githubusercontent.com/243674/32558666-a3f439b2-c4a5-11e7-83a3-db588c3e21e5.png)

Commits
-------

f7cb559a06 [DI] Add "container.hot_path" tag to flag the hot path and inline related services
2017-11-09 06:24:55 -08:00
Fabien Potencier
8e9f9765b5 bug #24878 [HttpFoundation] Prevent PHP from sending Last-Modified on session start (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Prevent PHP from sending Last-Modified on session start

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

I really don't know why PHP sends this Last-Modified header.
Let's bypass that and throw headers ourselves instead.

Commits
-------

2c0dc745d6 [HttpFoundation] Prevent PHP from sending Last-Modified on session start
2017-11-09 06:22:15 -08:00
Nicolas Grekas
f7cb559a06 [DI] Add "container.hot_path" tag to flag the hot path and inline related services 2017-11-09 15:14:31 +01:00
Serkan Yildiz
c256782cc7 [WebserverBundle] fixed the bug that caused that the webserver would … 2017-11-09 06:04:29 -08:00
Nicolas Grekas
d36adc2392 [FrameworkBundle] Fine-tune generated annotations.php cache 2017-11-09 13:39:01 +01:00
Nicolas Grekas
2c0dc745d6 [HttpFoundation] Prevent PHP from sending Last-Modified on session start 2017-11-09 12:02:13 +01:00
Nicolas Grekas
e78d1c4551 Micro optim using explicit root namespaces 2017-11-07 21:33:43 +01:00
Nicolas Grekas
3fc766ff4b [Bridge\Twig] Lazy-load deps 2017-11-07 18:37:38 +01:00
Nicolas Grekas
82ce33d5eb [3.4] Remove useless docblocks 2017-11-07 15:28:09 +01:00
Nicolas Grekas
5420cfca36 [Stopwatch] minor fix 2017-11-07 15:25:27 +01:00
Nicolas Grekas
629895c3ef Merge branch '3.3' into 3.4
* 3.3:
  [3.3] More docblock fixes
  [2.7] More docblock fixes
2017-11-07 15:20:24 +01:00
Nicolas Grekas
7b6cabad22 [3.3] More docblock fixes 2017-11-07 15:16:22 +01:00
Nicolas Grekas
d3d32d9deb Merge branch '2.8' into 3.3
* 2.8:
  [2.7] More docblock fixes
2017-11-07 15:12:55 +01:00
Nicolas Grekas
72b92c351e Merge branch '2.7' into 2.8
* 2.7:
  [2.7] More docblock fixes
2017-11-07 15:08:47 +01:00
Nicolas Grekas
ac671ac68c [2.7] More docblock fixes 2017-11-07 15:04:08 +01:00
Yonel Ceruto
4e0daecc63 Add default mapping path for validator component 2017-11-07 08:54:03 -05:00
Yonel Ceruto
43895b8dae Add default mapping path for serializer component 2017-11-07 08:53:47 -05:00
Nicolas Grekas
b2edd51177 bug #24850 [DI] Fix cannot bind env var (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix cannot bind env var

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment 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 | #24845 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

In #24602 we removed the processing of bindings from the `AbstractRecursivePass`. But there is actually one case where we want a recursive pass to process them: to resolve env param placeholders.

Commits
-------

f8f3a15 [DI] Fix cannot bind env var
2017-11-07 14:40:01 +01:00
Nicolas Grekas
69b48d0122 bug #24851 [TwigBridge] Fix BC break due required twig environment (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #24851).

Discussion
----------

[TwigBridge] Fix BC break due required twig environment

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | https://github.com/symfony/symfony/pull/24236#discussion_r149241720
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

See https://github.com/ezsystems/ezplatform-design-engine/pull/12 + https://github.com/silexphp/Silex-WebProfiler/pull/126 + https://github.com/bolt/bolt/pull/7154

Sorry for that :)

cc @fabpot

Commits
-------

243e4b2 [TwigBridge] Fix BC break due required twig environment
2017-11-07 14:35:34 +01:00
Roland Franssen
243e4b2e2f [TwigBridge] Fix BC break due required twig environment 2017-11-07 14:35:31 +01:00
Nicolas Grekas
88f228b9cd minor #24846 Fix some signatures in PHP-DSLs (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix some signatures in PHP-DSLs

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

Commits
-------

af85431 Fix some signatures in PHP-DSLs
2017-11-07 13:12:57 +01:00
Nicolas Grekas
c4ae73939e Merge branch '3.3' into 3.4
* 3.3:
  Random fixes
  Docblock fixes
  [HttpKernel] Enhance deprecation message
  [SecurityBundle] Fix the datacollector to properly support decision.object being null
2017-11-07 13:10:25 +01:00
Nicolas Grekas
49e57636f2 Random fixes 2017-11-07 13:07:19 +01:00
Nicolas Grekas
39a5801fc9 Merge branch '2.8' into 3.3
* 2.8:
  Docblock fixes
2017-11-07 12:58:40 +01:00
Nicolas Grekas
96dcb10a80 Merge branch '2.7' into 2.8
* 2.7:
  Docblock fixes
2017-11-07 12:56:23 +01:00
Nicolas Grekas
b56bfe7d8a Docblock fixes 2017-11-07 12:54:30 +01:00
Maxime Steinhausser
f8f3a15b7a [DI] Fix cannot bind env var 2017-11-07 09:01:11 +01:00
Nicolas Grekas
af8543107a Fix some signatures in PHP-DSLs 2017-11-06 21:11:38 +01:00
Edi Modrić
81b38ec215 [TwigBundle] Add default Twig templates path as a container param 2017-11-06 12:30:05 +01:00
Fabien Potencier
5dcd82ca28 minor #24829 [SecurityBundle] Fix the datacollector to properly support decision.object being null (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[SecurityBundle] Fix the datacollector to properly support decision.object being null

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment 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 | #24804 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Similar to https://github.com/symfony/symfony/pull/23050, when accessing a `Data` clone property through `__get()` and the value is `null` for instance, you'll really get `null` instead of a `Data` instance. The solution is to use `seek` instead whenever we access and try to use `profiler_dump` on a `Data` property that can be a simple scalar like `null` or `false`. AFAIK, `decision.object` is the only one here.

Commits
-------

769a5f204f [SecurityBundle] Fix the datacollector to properly support decision.object being null
2017-11-06 01:14:54 -08:00
Fabien Potencier
cbd42f7fa0 minor #24610 [HttpKernel] Enhance deprecation message (delboy1978uk)
This PR was squashed before being merged into the 3.3 branch (closes #24610).

Discussion
----------

[HttpKernel] Enhance deprecation message

Q | A
-- | --
Branch? | 3.4
Bug fix? | no
New feature? | no
BC breaks? | no
Deprecations? | no (Docblock with info on how to handle deprecation)
Tests pass? | yes
Fixed tickets | NA
License | MIT
Doc PR | symfony/symfony-docs#...

Commits
-------

9e9d01684e [HttpKernel] Enhance deprecation message
2017-11-06 01:12:10 -08:00
Derek Stephen McLean
9e9d01684e [HttpKernel] Enhance deprecation message 2017-11-06 01:12:09 -08:00
Fabien Potencier
0aedd686dd bumped Symfony version to 3.4.0 2017-11-05 15:20:14 -08:00
Fabien Potencier
f317976fcf updated VERSION for 3.4.0-BETA3 2017-11-05 14:51:48 -08:00
Maxime Steinhausser
769a5f204f [SecurityBundle] Fix the datacollector to properly support decision.object being null 2017-11-05 20:42:22 +01:00
Nicolas Grekas
eaeb820ee2 Merge branch '3.3' into 3.4
* 3.3:
  [HttpFoundation] Fix forward-compat of NativeSessionStorage with PHP 7.2
2017-11-05 20:07:09 +01:00
Nicolas Grekas
ed52036412 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Fix forward-compat of NativeSessionStorage with PHP 7.2
2017-11-05 20:07:00 +01:00
Nicolas Grekas
9ca5069cb4 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Fix forward-compat of NativeSessionStorage with PHP 7.2
2017-11-05 20:06:07 +01:00
Samuel ROZE
00a1357d82 [HttpFoundation] Fix forward-compat of NativeSessionStorage with PHP 7.2 2017-11-05 19:48:11 +01:00
Nicolas Grekas
e7cfaa9129 Remove useless phpdoc 2017-11-05 19:13:53 +01:00
Nicolas Grekas
db12a9872d [DI] Fix the "almost-circular refs" fix 2017-11-05 19:01:07 +01:00
Nicolas Grekas
e81005ed5e [Form] Fix low deps 2017-11-05 18:23:26 +01:00
Nicolas Grekas
51b15695f0 Fix merge 2017-11-05 18:11:12 +01:00
Nicolas Grekas
31e64bf7c5 Merge branch '3.3' into 3.4
* 3.3:
  [WebProfilerBundle] add missing tests
  Fix dump panel hidden when closing a dump
  FormInterface::getPropertyPath(): PropertyPathInterface|null
  [FrameworkBundle][Routing] Remove unused logger argument
2017-11-05 17:59:57 +01:00
Nicolas Grekas
024bfa4314 Merge branch '2.8' into 3.3
* 2.8:
  [WebProfilerBundle] add missing tests
  Fix dump panel hidden when closing a dump
  FormInterface::getPropertyPath(): PropertyPathInterface|null
  [FrameworkBundle][Routing] Remove unused logger argument
2017-11-05 17:53:00 +01:00
Fabien Potencier
d3054d6666 Merge branch '2.7' into 2.8
* 2.7:
  [WebProfilerBundle] add missing tests
  FormInterface::getPropertyPath(): PropertyPathInterface|null
  [FrameworkBundle][Routing] Remove unused logger argument
2017-11-05 08:18:41 -08:00
Fabien Potencier
4400921629 bug #24665 Fix dump panel hidden when closing a dump (julienfalque)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix dump panel hidden when closing a dump

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

In the dump panel of the debug bar, when closing a dump the panel sometimes get hidden:

![before](https://user-images.githubusercontent.com/1736542/31867025-615e9c48-b788-11e7-8329-96716c211523.gif)

This is because when the size of the panel is reduced, if the mouse is not over it anymore, the `:hover` pseudo-class does not apply anymore.

I "fixed" it by setting a min-height on the panel when closing a dump. The min-height is removed when leaving the panel _on purpose_:

![after](https://user-images.githubusercontent.com/1736542/31867054-d01a01cc-b788-11e7-9ef7-8418ae2b3094.gif)

For now I only tested it on Firefox 56 on Arch Linux.

Commits
-------

2e0b263d9c Fix dump panel hidden when closing a dump
2017-11-05 08:13:31 -08:00
Nicolas Grekas
73982760f7 Merge branch '3.3' into 3.4
* 3.3:
  [Serializer] Fix extra attributes when no group specified
  [Intl] Make intl-data tests pass and save language aliases again
  [Console] Fix CommandTester::setInputs() docblock
  [Serializer] readd default argument value
  [VarDumper] fix trailling comma when dumping an exception
  Remove useless docblocks
  [FrameworkBundle] Fix docblocks
  [PropertyInfo] Remove useless docblocks
2017-11-05 17:10:10 +01:00
Fabien Potencier
efb4891981 minor #24666 [WebProfilerBundle] add missing tests (mhujer)
This PR was squashed before being merged into the 2.7 branch (closes #24666).

Discussion
----------

[WebProfilerBundle] add missing tests

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

This PR fixes one test in WebDebugToolbarListenerTest and adds one that was missing (more detailed description is available in the commits description)

Commits
-------

363d3a8cf2 [WebProfilerBundle] add missing tests
2017-11-05 08:07:30 -08:00
Martin Hujer
363d3a8cf2 [WebProfilerBundle] add missing tests 2017-11-05 08:07:08 -08:00
Fabien Potencier
83c3282893 minor #24739 [FrameworkBundle][Routing] Remove unused logger argument (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][Routing] Remove unused logger argument

| 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 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This argument was never used as far as the FrameworkBundle Router was.
But actually don't we want to add the `$logger` argument to this class? It's used by the `UrlGenerator` when `router.strict_requirements` is `false` for instance:

<img width="1064" alt="screenshot 2017-10-29 a 09 57 31" src="https://user-images.githubusercontent.com/2211145/32142080-482bc64e-bc90-11e7-8382-b78b507bae48.PNG">

Commits
-------

dc9492eb6f [FrameworkBundle][Routing] Remove unused logger argument
2017-11-05 07:56:41 -08:00
Julien Falque
2e0b263d9c
Fix dump panel hidden when closing a dump 2017-11-05 16:52:23 +01:00
Fabien Potencier
51cfaf86e0 minor #24740 [Form] Nullable FormInterface::getPropertyPath() (vudaltsov)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Nullable FormInterface::getPropertyPath()

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

`Symfony\Component\Form\Form::getPropertyPath()` returns `null` when the form has an empty name. It allows for unprefixed children.

```php
<?php

namespace App\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\TextType;

class IndexController extends AbstractController
{
    /**
     * @Route(name="index")
     * @Template()
     */
    public function indexAction()
    {
        $form = $this->get('form.factory')
            ->createNamedBuilder('')
            ->add('text', TextType::class)
            ->getForm();

        return [
            'form' => $form->createView(),
        ];
    }
}
```

```html
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Welcome!</title>
    </head>
    <body>
        <form name="" method="post">
            <label for="text">Text</label>
            <input type="text" id="text" name="text">
        </form>
    </body>
</html>
```

But the return type of the `Symfony\Component\Form\FormInterface::getPropertyPath()` is not nullable.

We cannot change the behaviour, obviously. At least it's useful in API controllers.

So I decided to change the doc block of the interface.

Commits
-------

d56632a45f FormInterface::getPropertyPath(): PropertyPathInterface|null
2017-11-05 07:51:20 -08:00
ReenExe
79e8f57337 [HttpFoundation] refactoring: calculate when need 2017-11-05 07:49:31 -08:00
Nicolas Grekas
b354d6ca84 Merge branch '2.8' into 3.3
* 2.8:
  [Intl] Make intl-data tests pass and save language aliases again
  Remove useless docblocks
  [PropertyInfo] Remove useless docblocks
2017-11-05 16:47:03 +01:00
Fabien Potencier
e4bbd462f3 bug #24802 [TwigBridge] [Bootstrap 4] Fix hidden errors (ostrolucky)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] [Bootstrap 4] Fix hidden errors

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

Fixes displaying errors for:

- Symfony\Component\Form\Extension\Core\Type\BirthdayType
- Symfony\Component\Form\Extension\Core\Type\CheckboxType
- Symfony\Component\Form\Extension\Core\Type\DateIntervalType
- Symfony\Component\Form\Extension\Core\Type\DateTimeType
- Symfony\Component\Form\Extension\Core\Type\DateType
- Symfony\Component\Form\Extension\Core\Type\FileType
- Symfony\Component\Form\Extension\Core\Type\RadioType
- Symfony\Component\Form\Extension\Core\Type\TimeType

<table>
<tr><th>Layout</th><th>Before</th><th>After</th></tr>
<tr><td>vertical</td><td valign="top"><img src="https://user-images.githubusercontent.com/496233/32405939-1b4c92c8-c16f-11e7-9b21-8af296aa8d94.png" width="400" alt="less validation errors shown in vertical bs4 layout" /></td>
<td valign="top"><img src="https://user-images.githubusercontent.com/496233/32405935-008a3d8c-c16f-11e7-8155-2a51ab55ae9a.png" width="400" alt="more validation errors shown in vertical bs4 layout"  /></td>
</tr>
<tr><td>horizontal</td><td valign="top"><img src="https://user-images.githubusercontent.com/496233/32405984-213b432c-c170-11e7-832a-d94c7f7ddf07.png" width="400" alt="less validation errors shown in bs4 horizontal layout" /></td>
<td valign="top"><img src="https://user-images.githubusercontent.com/496233/32406022-bd25bf92-c170-11e7-893d-f071225f8273.png" width="400" alt="more validation errors shown"  /></td>
</tr>
</table>

Commits
-------

5810983e30 Fix displaying errors for bootstrap 4
2017-11-05 07:45:34 -08:00
Fabien Potencier
c57cb8e74b bug #24816 [Serializer] Fix extra attributes when no group specified (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[Serializer] Fix extra attributes when no group specified

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment 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 | #24783 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

~~Two commits, for two possible solutions, but I think the last one is probably the most efficient one, as the first one will also impact normalization and systematically try to intersect allowedAttributes and extractedAttributes.~~

Commits
-------

d1b343c015 [Serializer] Fix extra attributes when no group specified
2017-11-05 07:42:45 -08:00
Fabien Potencier
15ed486ea1 bug #24822 [DI] Fix "almost-circular" dependencies handling (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix "almost-circular" dependencies handling

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

In a situation like the following one, we used to trigger a circular reference exception. But this was a false positive, as the reference is resolvable without hitting the circle. Fixing this exception could be considered as a new feature (because no existing config needs it, since it fails). But for 3.4, this should be considered a bug fix, as reported in #24775: not handling this situation now means creating broken service trees.

``` php
$containerBuilder = new ContainerBuilder();

$container->register('foo', FooCircular::class)->setPublic(true)
   ->addArgument(new Reference('bar'));

$container->register('bar', BarCircular::class)
    ->addMethodCall('addFoobar', array(new Reference('foobar')));

$container->register('foobar', FoobarCircular::class)
    ->addArgument(new Reference('foo'));

$foo = $containerBuilder->get('foo');
```

Commits
-------

beb4df712c [DI] Fix "almost-circular" dependencies handling
2017-11-05 07:38:28 -08:00
Fabien Potencier
3671e08346 bug #24821 symfony/form auto-enables symfony/validator, even when not present (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

symfony/form auto-enables symfony/validator, even when not present

| Q             | A
| ------------- | ---
| Branch?       | 3.4 or master / 2.7, 2.8 or 3.3 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | not needed

In #24303, we allowed form to be used without the validator component. But, there is a small problem with the logic: the validation system is set to enabled, even if it is not present. If you install form but NOT validator, you see the error:

> Validation support cannot be enabled as the Validator component is not installed.

Assuming the form system really is usable without validation, this should be an easy merge.

Commits
-------

03c0254296 Only enabling validation if it is present
2017-11-05 07:35:58 -08:00
Nicolas Grekas
9bc9474ff0 Merge branch '2.7' into 2.8
* 2.7:
  [Intl] Make intl-data tests pass and save language aliases again
  Remove useless docblocks
2017-11-05 16:25:56 +01:00
Maxime Steinhausser
d1b343c015 [Serializer] Fix extra attributes when no group specified 2017-11-05 16:20:19 +01:00
Nicolas Grekas
5a3db6781c bug #24814 [Intl] Make intl-data tests pass and save language aliases again (jakzal)
This PR was squashed before being merged into the 2.7 branch (closes #24814).

Discussion
----------

[Intl] Make intl-data tests pass and save language aliases again

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

Due to changes in ICU 5.5 aliases were not being saved since that version.

Commits
-------

661a4b6 [Intl] Make intl-data tests pass and save language aliases again
2017-11-05 16:10:08 +01:00
Jakub Zalas
661a4b60d0 [Intl] Make intl-data tests pass and save language aliases again 2017-11-05 16:10:05 +01:00
Nicolas Grekas
49806e05fa minor #24724 Remove useless docblocks (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Remove useless docblocks

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

Commits
-------

2443511 Remove useless docblocks
2017-11-05 16:05:07 +01:00
David Maicher
645f712190 [FrameworkBundle][Config] fix: do not add resource checkers for debug=false 2017-11-05 14:56:21 +01:00
Nicolas Grekas
beb4df712c [DI] Fix "almost-circular" dependencies handling 2017-11-05 13:06:25 +01:00
Maxime Steinhausser
44f6e6db2c [Console] Fix CommandTester::setInputs() docblock 2017-11-05 12:28:12 +01:00
Ryan Weaver
03c0254296 Only enabling validation if it is present 2017-11-04 17:11:56 -04:00
Maxime Steinhausser
daf1bc20c7 minor #24725 [PropertyInfo] Remove useless docblocks (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Remove useless docblocks

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

Commits
-------

b58c31f2aa [PropertyInfo] Remove useless docblocks
2017-11-04 14:35:47 +01:00
Gabriel Ostrolucký
5810983e30 Fix displaying errors for bootstrap 4 2017-11-04 14:34:38 +01:00
Maxime Steinhausser
d483410086 minor #24726 [FrameworkBundle] Fix docblocks (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] Fix docblocks

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

3ebf6ac45b [FrameworkBundle] Fix docblocks
2017-11-04 14:34:20 +01:00
Fabien Potencier
e973c247c8 bug #24809 [Config] Fix dump of config references for deprecated nodes (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] Fix dump of config references for deprecated nodes

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

```yaml
# before
trusted_proxies:      [] # Deprecated (The "framework.trusted_proxies.trusted_proxies" configuration key has been deprecated in Symfony 3.3. Use the Request::setTrustedProxies() method in your front controller instead.)

#after
trusted_proxies:      [] # Deprecated (The "framework.trusted_proxies" configuration key has been deprecated in Symfony 3.3. Use the Request::setTrustedProxies() method in your front controller instead.)
```

Commits
-------

188eb34a71 Fix reference dump for deprecated nodes
2017-11-03 07:14:19 -07:00
Christian Flothmann
740abbe9ec [Serializer] readd default argument value 2017-11-03 15:12:43 +01:00
Robin Chalas
188eb34a71 Fix reference dump for deprecated nodes 2017-11-03 11:37:20 +01:00
Grégoire Pineau
25e0117152 [PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass 2017-11-03 11:03:57 +01:00
Fabien Potencier
2e3df94f3a bug #24774 [HttpKernel] Let the storage manage the session starts (sroze)
This PR was squashed before being merged into the 3.4 branch (closes #24774).

Discussion
----------

[HttpKernel] Let the storage manage the session starts

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

HttpKernel's request collector should not really care if the session has started or not, be let the storage decide. Without the session, it is not possible to track the redirected pages.

I don't think the consideration of "we should not start the session if not needed by the user's code" applies here as if this is running, that is very likely that the user is running the dev environment anyway.

Commits
-------

95d0b7235f [HttpKernel] Let the storage manage the session starts
2017-11-01 20:21:13 -07:00
Samuel ROZE
95d0b7235f [HttpKernel] Let the storage manage the session starts 2017-11-01 20:21:07 -07:00
Valentin
d56632a45f FormInterface::getPropertyPath(): PropertyPathInterface|null 2017-11-01 12:36:38 +03:00
Amrouche Hamza
fc3fe7f42e
[VarDumper] fix trailling comma when dumping an exception 2017-11-01 08:04:17 +01:00
Maxime Steinhausser
f5855fb039 [Validator] Fix TraceableValidator is reset on data collector instantiation 2017-10-31 17:02:06 +01:00
Fabien Potencier
5c46e393c7 Merge branch '3.3' into 3.4
* 3.3:
  removed extra whitespace
  Removes \n or space when / are empty
  [HttpFoundation] add Early Hints in Reponse to fix test
  Throwing exception if redis and predis unavailable
2017-10-31 08:19:40 -07:00
Fabien Potencier
3b54b3dfbc Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] add Early Hints in Reponse to fix test
2017-10-31 08:19:30 -07:00
Fabien Potencier
f334fb5d83 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] add Early Hints in Reponse to fix test
2017-10-31 08:19:21 -07:00
Fabien Potencier
30f3b91cad removed extra whitespace 2017-10-31 08:12:41 -07:00
Kirk Madera
0d8edaec79 Removes \n or space when / are empty 2017-10-31 08:11:27 -07:00
Amrouche Hamza
71ad77aed3
[HttpFoundation] add Early Hints in Reponse to fix test 2017-10-31 14:48:52 +01:00
Fabien Potencier
996f6ef3cb bumped Symfony version to 3.4.0 2017-10-30 15:52:56 -07:00
Fabien Potencier
33e9a13cac updated VERSION for 3.4.0-BETA2 2017-10-30 15:31:12 -07:00
Fabien Potencier
2280f844bf fixed tests 2017-10-30 14:07:44 -07:00
Fabien Potencier
dbf544487f fixed CS 2017-10-30 12:08:07 -07:00
Fabien Potencier
4ae046fd3c bug #24728 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless (arkste)
This PR was squashed before being merged into the 3.4 branch (closes #24728).

Discussion
----------

[Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless

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

As discussed in #24711 i reverted the change i did in `bootstrap_3_layout.html.twig` (which caused an unnecessary empty div-container in the vertical-layout), added the `checkbox_row` block to the `bootstrap_3_horizontal_layout.html.twig` and removed `spaceless` (as proposed in #24727).

since i added `{#--#}` in bootstrap 3, i did the same for the same horizontal blocks in bootstrap 4 as well.

I moved the `form_label_class` & `form_group_class` blocks to the top of `bootstrap_3_horizontal_layout.html.twig` & `bootstrap_4_horizontal_layout.html.twig`, this should improve DX as they were spreaded across the file.

#24702 affected the bootstrap 4 horizontal layout as well, so i added the `checkbox_row` block to bootstrap 4 too.

ping @fabpot @nicolas-grekas

Commits
-------

f84749f745 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless
2017-10-30 12:07:29 -07:00
Arkadius Stefanski
f84749f745 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless 2017-10-30 12:07:24 -07:00
Aaron Scherer
e664c81f12 Throwing exception if redis and predis unavailable 2017-10-30 11:07:15 -07:00
Fabien Potencier
039250acb3 bug #24709 [HttpKernel] Move services reset to Kernel::handle()+boot() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Move services reset to Kernel::handle()+boot()

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

This is an alternative to #24697 (which uses middlewares).
This PR adds a new `services_resetter` service that the Kernel calls on 2nd root requests to reset services.
Instead of #24697 which plans for optional enabling of the services reset, this approach moves the responsibility of calling the services resetter to the core Kernel class, so that no configuration/middleware/etc. is required at all, and no overhead exists at all for regular requests.

Commits
-------

4501a3688b [HttpKernel] Move services reset to Kernel
2017-10-30 11:03:10 -07:00
Nicolas Grekas
4501a3688b [HttpKernel] Move services reset to Kernel 2017-10-30 19:01:22 +01:00