Commit Graph

32549 Commits

Author SHA1 Message Date
Maxime Steinhausser
769a5f204f [SecurityBundle] Fix the datacollector to properly support decision.object being null 2017-11-05 20:42:22 +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
Nicolas Grekas
ff58ec865c bug #24531 [HttpFoundation] Fix forward-compat of NativeSessionStorage with PHP 7.2 (sroze)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix forward-compat of NativeSessionStorage with PHP 7.2

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

PHP 7.2 disallow setting session options when the session was already started. This PR will not set any option if the session is already started and throw an exception if trying to do so with custom options.

Commits
-------

00a1357 [HttpFoundation] Fix forward-compat of NativeSessionStorage with PHP 7.2
2017-11-05 20:04:12 +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
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
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
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
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
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
Robin Chalas
0c2d77cb33 minor #24823 [Console] Fix CommandTester::setInputs() docblock (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[Console] Fix CommandTester::setInputs() docblock

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| 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

Commits
-------

44f6e6d [Console] Fix CommandTester::setInputs() docblock
2017-11-05 12:35:01 +01:00
Maxime Steinhausser
44f6e6db2c [Console] Fix CommandTester::setInputs() docblock 2017-11-05 12:28:12 +01: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
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
f422db8192 bug #24810 [Serializer] readd default argument value (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Serializer] readd default argument value

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

Commits
-------

740abbe9ec [Serializer] readd default argument value
2017-11-03 07:22:13 -07:00
Christian Flothmann
740abbe9ec [Serializer] readd default argument value 2017-11-03 15:12:43 +01:00
Nicolas Grekas
3bc7b3a54f bug #24735 [VarDumper] fix trailling comma when dumping an exception (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[VarDumper] fix trailling comma when dumping an exception

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

This PR is fixing a behaviour when a exception got every single line with a comma.

Commits
-------

fc3fe7f [VarDumper] fix trailling comma when dumping an exception
2017-11-01 18:57:21 +01: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
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
151e5e87af bug #24764 [HttpFoundation] add Early Hints to Reponse to fix test (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] add Early Hints to Reponse to fix test

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

This line seems to be needed in order to fix the tests, maybe it has been forgot in merge ?

Commits
-------

71ad77aed3 [HttpFoundation] add Early Hints in Reponse to fix test
2017-10-31 08:14:03 -07:00
Fabien Potencier
30f3b91cad removed extra whitespace 2017-10-31 08:12:41 -07:00
Fabien Potencier
cb6c394d7f bug #24759 Removes \n or space when $context/$extra are empty (kirkmadera)
This PR was squashed before being merged into the 3.3 branch (closes #24759).

Discussion
----------

Removes \n or space when $context/$extra are empty

Simple log messages cause extra spaces or newlines when using the default format and $context or $extra are empty, resulting in output like this:

```
23:24:41 DEBUG     [test] debug

23:24:41 INFO      [test] info

23:24:41 NOTICE    [test] notice

23:24:41 WARNING   [test] warning

23:24:41 ERROR     [test] error

```

This makes reviewing command history difficult.

In the instance where $context or $extra is empty, it should not get appended with a space or newline.

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

Commits
-------

0d8edaec79 Removes \n or space when / are empty
2017-10-31 08:11:30 -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
ca10f8ee2c bug #24758 Throwing exception if redis and predis unavailable (aequasi)
This PR was squashed before being merged into the 3.3 branch (closes #24758).

Discussion
----------

Throwing exception if redis and predis unavailable

If the redis extension and predis are unavailable, line 137 throws an exception stating that \Predis\Client is not a class.

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

If the redis extension and predis are unavailable, the new line 137 throws an exception stating that \Predis\Client is not a class.

Commits
-------

e664c81f12 Throwing exception if redis and predis unavailable
2017-10-30 11:07:17 -07:00
Aaron Scherer
e664c81f12 Throwing exception if redis and predis unavailable 2017-10-30 11:07:15 -07:00
Fabien Potencier
7031b61187 Merge branch '2.8' into 3.3
* 2.8:
  [SecurityBundle] hotfix: update phpdocs on logout url
  [FrameworkBundle] Do not load property_access.xml if the component isn't installed
  Fixed a few spelling mistakes in Luxembourgish translation
2017-10-29 14:07:11 -07:00
Fabien Potencier
4a4f4d2ca2 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Do not load property_access.xml if the component isn't installed
  Fixed a few spelling mistakes in Luxembourgish translation
2017-10-29 14:04:14 -07:00
Fabien Potencier
1da0ba565d bug #24744 debug:container --types: Fix bug with non-existent classes (weaverryan)
This PR was merged into the 3.3 branch.

Discussion
----------

debug:container --types: Fix bug with non-existent classes

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

I've just tested manually that this *does* fix the issue I described in #24639.

Oddly enough, in a "stock" Flex project, after this patch, there is one *additional* "type" that's reported:

> Symfony\Component\PropertyAccess\PropertyAccessorInterface   alias for "property_accessor"

That is a valid type... for some reason `interface_exists()` return false for this (??? maybe a quirk of my machine). Anyways, this is also "fixed" with this new approach.

Commits
-------

4bb9d8207f Fixing a bug where non-existent classes would cause issues
2017-10-29 13:58:31 -07:00
Ryan Weaver
4bb9d8207f Fixing a bug where non-existent classes would cause issues 2017-10-29 13:47:23 -04:00
Nicolas Grekas
2443511324 Remove useless docblocks 2017-10-29 10:49:53 +01:00
Maxime Steinhausser
dc9492eb6f [FrameworkBundle][Routing] Remove unused logger argument 2017-10-29 09:47:50 +01:00
Maxime Steinhausser
eedd43430a minor #24736 [SecurityBundle] hotfix: update phpdocs on logout url (Simperfit)
This PR was merged into the 2.8 branch.

Discussion
----------

[SecurityBundle] hotfix: update phpdocs on logout url

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

Just fixing a little phpdocs while doing another feature.

Commits
-------

8df6787e7a [SecurityBundle] hotfix: update phpdocs on logout url
2017-10-29 09:26:07 +01:00
Amrouche Hamza
8df6787e7a
[SecurityBundle] hotfix: update phpdocs on logout url 2017-10-29 08:37:35 +01:00
Fabien Potencier
d7e859e3c8 bug #24605 [FrameworkBundle] Do not load property_access.xml if the component isn't installed (ogizanagi)
This PR was squashed before being merged into the 2.7 branch (closes #24605).

Discussion
----------

[FrameworkBundle] Do not load property_access.xml if the component isn't installed

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- 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 | https://github.com/symfony/symfony/pull/24563#issuecomment-337549147 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This PR actually aims to fix https://github.com/symfony/symfony/pull/24563#issuecomment-337549147 as the exception introduced in the PR can't be reached anyway when using the FrameworkBundle without the property access component as you'll get:

> Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "PropertyAccessor" from namespace "Symfony\Component\PropertyAccess".

With this fix, you properly get:

> The ObjectNormalizer class requires the "PropertyAccess" component. Install "symfony/property-access" to use it.

Not sure this change really belongs to a patch release, but the original PR was accepted in the 2.7 branch.

Also, I'd rather remove the ObjectNormalizer definition if the component isn't available, as suggested by @xabbuh (https://github.com/symfony/symfony/pull/24563#issuecomment-336795644). But in 2.7, this is the only normalizer registered by default and the [`SerializerPass` throws an exception if no normalizer is registered.](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SerializerPass.php#L46)

To sum up, either:

1. we completly prevent using the FrameworkBundle and the serializer without the property access component, even if you don't really care about the ObjectNormalizer because you only use your owns specific ones. (and you'll get the exception hinting to install the property access component)
2. we allow using the FrameworkBundle and the serializer without the property access component, so we remove the ObjectNormalizer definition, but the user'll get a `You must tag at least one service as "serializer.normalizer" to use the Serializer service` exception until he configures a normalizer (and we don't get the hint about installing the property access component to enable the ObjectNormalizer. We already have a suggest entry in the composer.json file, though).

To me option 2 looks better. WDYT?

Commits
-------

d297e27600 [FrameworkBundle] Do not load property_access.xml if the component isn't installed
2017-10-28 15:12:30 -07:00
Maxime Steinhausser
d297e27600 [FrameworkBundle] Do not load property_access.xml if the component isn't installed 2017-10-28 15:12:29 -07:00
Nicolas Grekas
3ebf6ac45b [FrameworkBundle] Fix docblocks 2017-10-28 20:54:29 +02:00
Nicolas Grekas
b58c31f2aa [PropertyInfo] Remove useless docblocks 2017-10-28 20:53:30 +02:00