Commit Graph

23815 Commits

Author SHA1 Message Date
Fabien Potencier
1cd8aa1605 updated CHANGELOG for 2.3.37 2016-01-14 10:14:30 +01:00
Fabien Potencier
2918fdff6f Merge branch '2.7' into 2.8
* 2.7:
  added missing requirement
  removed obsolete tests, fixed composer.json
  do not ship with a custom rng implementation
2016-01-14 10:10:32 +01:00
Fabien Potencier
f898fa7f53 added missing requirement 2016-01-14 10:08:21 +01:00
Fabien Potencier
dea8f08bc1 Merge branch '2.3' into 2.7
* 2.3:
  removed obsolete tests, fixed composer.json
  do not ship with a custom rng implementation
2016-01-14 10:07:40 +01:00
Fabien Potencier
54d7f2dfb9 security #17359 do not ship with a custom rng implementation (xabbuh, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

do not ship with a custom rng implementation

Commits
-------

b91441c removed obsolete tests, fixed composer.json
fcd3160 do not ship with a custom rng implementation
2016-01-14 09:59:32 +01:00
Fabien Potencier
b91441c6cc removed obsolete tests, fixed composer.json 2016-01-14 09:49:27 +01:00
Christian Flothmann
fcd3160a0f do not ship with a custom rng implementation 2016-01-14 09:34:47 +01:00
Nicolas Grekas
45feb164c2 bug #17253 [Console] HHVM read input stream bug (mbutkereit)
This PR was squashed before being merged into the 2.8 branch (closes #17253).

Discussion
----------

[Console] HHVM read input stream bug

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

HHVM readline() function requires a parameter  see:

https://github.com/facebook/hhvm/blob/master/hphp/runtime/ext/readline/ext_readline.php

But the php readline does not require one.
```
In   Symfony\Component\Console\Helper\QuestionHelper
 …
 readFromInput($stream)
 …
```
we use readline() without a parameter.

HHVM Version:
```
HipHop VM 3.10.1 (rel)
Compiler: tags/HHVM-3.10.1-0-g689b4969a141620ee5a282ce0dbf72278c84d44b
Repo schema: 6c99ee1f98340f6f3ef397a332583f0e843a627d
```

Docker Container:
```
docker run --rm -it -v `pwd`:`pwd` -w `pwd` brunoric/hhvm:deb hhvm test.php ls
```
Test.php
```
<?php
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;

use Symfony\Component\Console\Helper\QuestionHelper;

require_once  "vendor/autoload.php";

$console = new Application();

$console
    ->register('ls')
    ->setDescription('Try input')
    ->setCode(function (InputInterface $input, OutputInterface $output) {

        $question = new Question('Your email address: ');
        $question->setValidator(
            function ($answer) {
                return $answer;
            }
        );
        $question->setMaxAttempts(5);
		    $helper = new QuestionHelper();
	      $email = $helper->ask($input, $output, $question);

        $output->writeln(sprintf('Email Adress: <info>%s</info>', $email));
    })
;
$console->run();
```

composer.json
```
{
    "require": {
        "symfony/console": "^3.0"
    }
}
```

Result:
No input is possible and you got a warning
```
Your email address:
Warning: readline() expects exactly 1 parameter, 0 given in /clitest/vendor/symfony/console/Helper/QuestionHelper.php on line 436
Email Adress:
```

Fix:
Add a empty string parameter to  readline() or use fgets() for hhvm.

Commits
-------

e7f17a7 [Console] HHVM read input stream bug
2016-01-14 09:33:16 +01:00
Marvin Butkereit
e7f17a794a [Console] HHVM read input stream bug 2016-01-14 09:33:14 +01:00
Fabien Potencier
8d53763a74 Merge branch '2.7' into 2.8
* 2.7:
  Fix max width for multibyte keys in choice question
  [Console] Display console application name even when no version set
  Remove empty statements.
2016-01-14 09:26:52 +01:00
Fabien Potencier
5c29e717a2 Merge branch '2.3' into 2.7
* 2.3:
  [Console] Display console application name even when no version set
  Remove empty statements.
2016-01-14 09:26:43 +01:00
Fabien Potencier
6a870f12ae bug #17314 Fix max width for multibyte keys in choice question (mheki)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #17314).

Discussion
----------

Fix max width for multibyte keys in choice question

Fixes wrong key max width for ChoiceQuestion in multibyte strings

Before:
![before](https://cloud.githubusercontent.com/assets/2435655/12203385/977e88c0-b626-11e5-9425-d497f84a9ab3.png)

After:
![after](https://cloud.githubusercontent.com/assets/2435655/12203390/9d9a0b4e-b626-11e5-8d4e-ba9290820778.png)

To replicate you can use this code as an example:
```
namespace AppBundle\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ChoiceQuestion;

class QuesionCommand extends Command
{
    protected function configure()
    {
        $this->setName('app:question');
        $this->setDescription('Command for testing PR');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $helper = $this->getHelper('question');

        $question = new ChoiceQuestion('Choose something:',
            [
                'foo' => 'foo',
                'żółw' => 'bar',
                'łabądź' => 'baz',
                'известно' => 'lorem',
                'газета' => 'ipsum',
            ],
            0);

        $colour = $helper->ask($input, $output, $question);
        $output->writeln('you have chosen: ' . $colour);
    }
}
```

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

Commits
-------

5d2463b Fix max width for multibyte keys in choice question
2016-01-14 09:06:08 +01:00
Marek Pietrzak
5d2463b925 Fix max width for multibyte keys in choice question 2016-01-14 09:06:07 +01:00
Fabien Potencier
5781bbce01 bug #17326 [Console] Display console application name even when no version set (polc)
This PR was squashed before being merged into the 2.3 branch (closes #17326).

Discussion
----------

[Console] Display console application name even when no version set

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

When displaying help of an Application with a name but no version, it show "Console Tool" instead of the application name.

Commits
-------

61e810e [Console] Display console application name even when no version set
2016-01-14 08:51:59 +01:00
Paul LE CORRE
61e810e769 [Console] Display console application name even when no version set 2016-01-14 08:51:57 +01:00
Fabien Potencier
c8c94772b5 minor #17354 [2.3] Remove empty statements. (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Remove empty statements.

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

Test run for new fixer to see if it would be suitable for SF.
For ref.: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1671

Commits
-------

4491c97 Remove empty statements.
2016-01-14 08:48:21 +01:00
Possum
4491c970b3 Remove empty statements. 2016-01-13 18:07:01 +01:00
Nicolas Grekas
26979ed6ca Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] Fix tests on PHP 7.0.2
  [2.7] Workaround https://bugs.php.net/63206
  [2.3] Workaround https://bugs.php.net/63206
  Add closing parenthesis
  [Serializer] Unset object_to_populate after using it
  [Serializer] Allow to use proxies in object_to_populate
2016-01-13 11:28:07 +01:00
Nicolas Grekas
3c6d1a93dd Merge branch '2.3' into 2.7
* 2.3:
  [Yaml] Fix tests on PHP 7.0.2
  [2.3] Workaround https://bugs.php.net/63206
  Add closing parenthesis
2016-01-13 11:26:43 +01:00
Kévin Dunglas
eac37cd4ae bug #17328 [Serializer] Allow to use proxies in object_to_populate (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Allow to use proxies in object_to_populate

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15627, dunglas/DunglasApiBundle#381
| License       | MIT
| Doc PR        | n/a

Allows to populate a proxy (or any class having the given type).

Commits
-------

b16b5b9 [Serializer] Allow to use proxies in object_to_populate
2016-01-13 11:07:31 +01:00
Nicolas Grekas
c60053e0fd bug #17202 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Don't log twice with the error handler

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

ping @Tobion @yapro does it work as expected with this patch?

Commits
-------

5926ff2 [FrameworkBundle] Don't log twice with the error handler
2016-01-13 10:41:30 +01:00
Nicolas Grekas
fe83ab953e bug #17347 [2.7] Workaround https://bugs.php.net/63206 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Workaround https://bugs.php.net/63206

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

Commits
-------

d44e0b7 [2.7] Workaround https://bugs.php.net/63206
2016-01-13 10:06:51 +01:00
Nicolas Grekas
26af0ae56b minor #17348 [Yaml] Fix tests on PHP 7.0.2 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Fix tests on PHP 7.0.2

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

Related to https://bugs.php.net/66179 that has been fixed in 7.0.2

Commits
-------

902f6dd [Yaml] Fix tests on PHP 7.0.2
2016-01-13 10:03:05 +01:00
Nicolas Grekas
902f6ddb93 [Yaml] Fix tests on PHP 7.0.2 2016-01-13 09:54:41 +01:00
Nicolas Grekas
5926ff2f95 [FrameworkBundle] Don't log twice with the error handler 2016-01-13 09:37:36 +01:00
Nicolas Grekas
d44e0b7212 [2.7] Workaround https://bugs.php.net/63206 2016-01-13 08:57:33 +01:00
Fabien Potencier
7a02f4e43e minor #17346 [2.3] Workaround https://bugs.php.net/63206 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Workaround https://bugs.php.net/63206

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

This bug has almost no chance to be hit in this code but still, cleaning any potential issue is worth.

Commits
-------

c5479dd [2.3] Workaround https://bugs.php.net/63206
2016-01-13 08:40:10 +01:00
Nicolas Grekas
c5479dde8c [2.3] Workaround https://bugs.php.net/63206 2016-01-13 08:28:48 +01:00
Tobias Schultze
36eb8188ca minor #17344 [Event Dispatcher] Add closing parenthesis (omerida)
This PR was merged into the 2.3 branch.

Discussion
----------

[Event Dispatcher] Add closing parenthesis

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

Commits
-------

5cdccc4 Add closing parenthesis
2016-01-13 00:06:22 +01:00
omerida
5cdccc4350 Add closing parenthesis 2016-01-12 14:46:23 -05:00
Fabien Potencier
4c32c1a0b7 minor #17281 [Serializer] Unset object_to_populate after using it (dunglas)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #17281).

Discussion
----------

[Serializer] Unset object_to_populate after using it

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

The `object_to_populate` key must be unset after using it to avoid problems when normalizing sub objects. Needed for #17193.

Commits
-------

ff18b68 [Serializer] Unset object_to_populate after using it
2016-01-12 19:26:02 +01:00
Kévin Dunglas
ff18b68e77 [Serializer] Unset object_to_populate after using it 2016-01-12 19:26:02 +01:00
Fabien Potencier
4ed54a39ab Merge branch '2.7' into 2.8
* 2.7:
  Typo fix
  [2.3] Static Code Analysis for Components
  Added support \IteratorAggregate for UniqueEntityValidator
  Update AbstractChoiceListTest.php
  Fix #17306 Paths with % in it are note allowed (like urlencoded)
  Use proper class to fetch $versionStrategy property
  Added sort order SORT_STRING for params in UriSigner
  Remove normalizer cache in Serializer class
2016-01-12 18:46:01 +01:00
Fabien Potencier
da655a9368 Merge branch '2.3' into 2.7
* 2.3:
  Typo fix
  [2.3] Static Code Analysis for Components
  Added support \IteratorAggregate for UniqueEntityValidator
  Fix #17306 Paths with % in it are note allowed (like urlencoded)
  Added sort order SORT_STRING for params in UriSigner
  Remove normalizer cache in Serializer class
2016-01-12 18:44:11 +01:00
Fabien Potencier
3331c8ac2a bug #17199 [Serializer] Allow context to contain not serializable data (dunglas, nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Serializer] Allow context to contain not serializable data

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

Allow the context to contain not serializable data even for the `ObjectNormalizer` (BC break fix).

Commits
-------

996f69d Merge pull request #2 from nicolas-grekas/ser-cache
8560c13 [Serializer] Use $context['cache_key'] to enhance caching
c1740fc [Serializer] ObjectNormalizer: context can contain not serializable data
2016-01-12 18:19:17 +01:00
Fabien Potencier
406e260c49 minor #17338 [Documentation] Typo fix (quentint)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17338).

Discussion
----------

[Documentation] Typo fix

Commits
-------

12fd48c Typo fix
2016-01-12 18:16:47 +01:00
Quentin
12fd48c192 Typo fix 2016-01-12 18:16:37 +01:00
Fabien Potencier
51a5a2659c bug #17334 [WebProfiler] Fixed sf-minitoolbar height (yceruto)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfiler] Fixed sf-minitoolbar height

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

![toolbar-sf-2 8](https://cloud.githubusercontent.com/assets/2028198/12245117/d293c178-b874-11e5-981b-0ca335a8c3aa.png)

EDIT: This bug occurs when we use
```css
* {
    box-sizing: border-box;
}
```
in the stylesheet (TwitterBootstrap for instance)

Commits
-------

9d1e65d [WebProfiler] Fixed sf-minitoolbar height
2016-01-12 18:13:32 +01:00
Yonel Ceruto González
9d1e65dc02 [WebProfiler] Fixed sf-minitoolbar height
added box-sizing

Restore padding box (no visual changes)
2016-01-12 09:10:28 -05:00
Kévin Dunglas
996f69df27 Merge pull request #2 from nicolas-grekas/ser-cache
[Serializer] Use $context['cache_key'] to enhance caching
2016-01-12 13:45:44 +01:00
Tobias Schultze
85d5ed29d7 bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur)
This PR was merged into the 2.3 branch.

Discussion
----------

[Serializer] Remove normalizer cache in Serializer class

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

The serializer cache the normalizer/denormalizer to use based only on the class and format. But the supportsNormalization and supportDenormalization methods can decide based on the data passed leading to hard to find bugs when the serializer used a cached normalizer it shouldn't use.

Commits
-------

8566dc1 Remove normalizer cache in Serializer class
2016-01-12 13:31:34 +01:00
Fabien Potencier
f1cce4e139 minor #17282 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #17282).

Discussion
----------

[2.3] Static Code Analysis for Components

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

Static Code Analysis with Php Inspections (EA Extended):
    - several code constructs simplification
    - decoupling statements from foreach
    - extra colons/parenthesis removal (code style)
    - correct string functions usage (micro-optimization)
    - variable functions usage (php 5 compatible)

Commits
-------

81f8181 [2.3] Static Code Analysis for Components
2016-01-12 12:31:36 +01:00
Vladimir Reznichenko
81f81812a5 [2.3] Static Code Analysis for Components 2016-01-12 12:31:34 +01:00
Nicolas Grekas
9eb522ecfc bug #17320 [Debug] Fixed erroneous deprecation notice for extended Interfaces (peterrehm)
This PR was merged into the 2.8 branch.

Discussion
----------

[Debug] Fixed erroneous deprecation notice for extended Interfaces

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

Replaces #16775.

Commits
-------

5f4e968 Fixed erroneous deprecation notice for extended Interfaces
2016-01-12 10:07:55 +01:00
Nicolas Grekas
8560c1367e [Serializer] Use $context['cache_key'] to enhance caching 2016-01-12 09:13:32 +01:00
Tobias Schultze
0df74c8ba4 minor #17332 [2.8] [Routing] cs fix (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] [Routing] cs fix

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

- remove unused use statement in `ServiceRouterLoader`
- add missing param in phpdoc in `RouteCollectionBuilder`

Commits
-------

9982f96 [Routing] cs fix
2016-01-12 01:20:05 +01:00
Peter Rehm
5f4e968cb9 Fixed erroneous deprecation notice for extended Interfaces 2016-01-11 19:57:09 +01:00
Jules Pietri
9982f96caa [Routing] cs fix
- remove unused use statement in `ServiceRouterLoader`
- add missing param in phpdoc in `RouteCollectionBuilder`
2016-01-11 17:43:36 +01:00
Fabien Potencier
a02bd4b753 bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix paths with % in it (like urlencoded)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | Travis passed
| Fixed tickets | #17306
| License       | MIT
| Doc PR        | none

Commits
-------

de7b4d7 Fix #17306 Paths with % in it are note allowed (like urlencoded)
2016-01-11 11:07:30 +01:00
Fabien Potencier
aa9801e8a2 bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #17078).

Discussion
----------

[Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator

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

Expand the list of supported types of results returned from the repositories.
Added processing of type \IteratorAggregate (and as a consequence doctrine Collection)

Commits
-------

6ebd179 Added support \IteratorAggregate for UniqueEntityValidator
2016-01-11 11:04:47 +01:00