Commit Graph

25909 Commits

Author SHA1 Message Date
Fabien Potencier
ab520a13c6 fixed tests 2016-12-19 17:17:38 +01:00
Fabien Potencier
0f9a7287c3 fixed obsolete getMock() usage 2016-12-19 16:48:05 +01:00
Fabien Potencier
84e75a78b3 Merge branch '2.7' into 2.8
* 2.7:
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
2016-12-19 16:38:44 +01:00
Fabien Potencier
3008fa373a minor #20984 fixed obsolete getMock() usage (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

fixed obsolete getMock() usage

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

Let's do it.

Commits
-------

71d059c fixed obsolete getMock() usage
2016-12-19 16:36:29 +01:00
Fabien Potencier
71d059cad1 fixed obsolete getMock() usage 2016-12-19 16:22:46 +01:00
Maxime Steinhausser
e189183689 [Console] SymfonyStyle: Escape trailing backslashes in user texts 2016-12-19 11:07:02 +01:00
Fabien Potencier
f1675c2ddd bug #20599 [WebProfilerBundle] Display multiple HTTP headers in WDT (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Display multiple HTTP headers in WDT

| Q             | A
| ------------- | ---
| Branch?       | 2.7 (partially in 3.2 already)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no-ish
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | [#20595 (comment)](https://github.com/symfony/symfony/pull/20595#issuecomment-262311651)
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Backport of https://github.com/symfony/symfony/pull/20595 for 2.7, that includes a fix for displaying multiple HTTP headers in the WDT.

![image](https://cloud.githubusercontent.com/assets/1047696/20536902/43de2692-b0eb-11e6-8eb7-f0584daf5963.png)

//cc @nicolas-grekas this should cover 2.7 - 3.1 right?

Commits
-------

257a856 [WebProfilerBundle] Display multiple HTTP headers in WDT
2016-12-19 09:19:07 +01:00
Maxime Steinhausser
313defaadf Mention the community review guide 2016-12-18 22:02:35 +01:00
Roland Franssen
257a856f9f [WebProfilerBundle] Display multiple HTTP headers in WDT 2016-12-18 15:34:37 +00:00
Christian Flothmann
fb91f74b34 [Form] fix group sequence based validation 2016-12-17 23:43:59 +01:00
Fabien Potencier
2ef2264ba3 minor #20974 [TwigBundle] do not remove the Twig ExceptionController service (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[TwigBundle] do not remove the Twig ExceptionController service

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

Commits
-------

c9e560f do not remove the Twig ExceptionController service
2016-12-17 22:57:23 +01:00
Christian Flothmann
c9e560f1b7 do not remove the Twig ExceptionController service 2016-12-17 22:15:07 +01:00
Fabien Potencier
faf2370a3d removed obsolete condition 2016-12-17 19:04:40 +01:00
Fabien Potencier
c7f9baf8f4 Merge branch '2.7' into 2.8
* 2.7:
  do not try to register incomplete definitions
2016-12-17 19:00:59 +01:00
Fabien Potencier
3e874dc878 bug #20799 [TwigBundle] do not try to register incomplete definitions (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] do not try to register incomplete definitions

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

Commits
-------

2c9dc66 do not try to register incomplete definitions
2016-12-17 18:59:13 +01:00
Robin Chalas
9d46712103
[Console] Fix question formatting using SymfonyStyle::ask() 2016-12-17 14:04:43 +01:00
Nicolas Grekas
55da229acb Merge branch '2.7' into 2.8
* 2.7:
  [Validator] phpize default option values
  test for the Validator component to be present
  [DependencyInjection] Fix on-invalid attribute type in xsd
  [FrameworkBundle] Fix PHP form templates on translatable attributes
  [VarDumper] Fix dumping by-ref variadics
2016-12-17 11:44:20 +01:00
Nicolas Grekas
1d6d5fe586 minor #20969 [Security] Fix test (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] Fix test

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

8aeed88 [Security] Fix test
2016-12-17 11:42:22 +01:00
Nicolas Grekas
8aeed88179 [Security] Fix test 2016-12-17 11:40:05 +01:00
Fabien Potencier
0a4a92b05b bug #20961 [Validator] phpize default option values (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] phpize default option values

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

This makes the behavior for default constraints inline with the behavior
when the option is given explicitly.

Commits
-------

d65679b [Validator] phpize default option values
2016-12-17 08:46:09 +01:00
Fabien Potencier
2344c2204b bug #20934 [FrameworkBundle] Fix PHP form templates on translatable attributes (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix PHP form templates on translatable attributes

| 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/20365#issuecomment-267333293
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Separated from #20365

Commits
-------

10806e0 [FrameworkBundle] Fix PHP form templates on translatable attributes
2016-12-17 08:43:35 +01:00
Fabien Potencier
a2c2d15c13 bug #20957 [FrameworkBundle] test for the Validator component to be present (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] test for the Validator component to be present

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

Commits
-------

fb9b083 test for the Validator component to be present
2016-12-16 17:23:42 +01:00
Christian Flothmann
d65679b302 [Validator] phpize default option values
This makes the behavior for default constraints inline with the behavior
when the option is given explicitly.
2016-12-16 16:54:54 +01:00
Christian Flothmann
fb9b08396b test for the Validator component to be present 2016-12-16 14:02:12 +01:00
Fabien Potencier
89d5ec002e bug #20936 [DependencyInjection] Fix on-invalid attribute type in xsd (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] Fix on-invalid attribute type in xsd

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

Commits
-------

e66d3da [DependencyInjection] Fix on-invalid attribute type in xsd
2016-12-16 08:58:24 +01:00
Maxime Steinhausser
e66d3da91a [DependencyInjection] Fix on-invalid attribute type in xsd 2016-12-15 15:48:03 +01:00
Roland Franssen
10806e056e [FrameworkBundle] Fix PHP form templates on translatable attributes 2016-12-15 14:04:46 +00:00
Nicolas Grekas
4299dae7c0 bug #20931 [VarDumper] Fix dumping by-ref variadics (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix dumping by-ref variadics

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

The correct php syntax is `&...$foo`, not ~~`...&$foo`~~

Commits
-------

28ec361 [VarDumper] Fix dumping by-ref variadics
2016-12-15 14:06:00 +01:00
Nicolas Grekas
28ec36140d [VarDumper] Fix dumping by-ref variadics 2016-12-15 08:56:57 +01:00
Christian Flothmann
2c9dc66665 do not try to register incomplete definitions 2016-12-15 08:06:17 +01:00
Fabien Potencier
839c0836ee Merge branch '2.7' into 2.8
* 2.7:
  [Validator] add Indonesian translation
  fixed CS
  [config] Fix issue when key removed and left value only
  [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
2016-12-14 09:13:10 +01:00
Fabien Potencier
cf9f541f22 minor #20914 [Validator] add Indonesian translation (IndraGunawan)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #20914).

Discussion
----------

[Validator] add Indonesian translation

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

Business Identifier Code (BIC) is not translate to Bahasa Indonesia because i cant found the formal translation.
i found http://www.bi.go.id/id/peraturan/sistem-pembayaran/Documents/se_173115.pdf page:24 Bank Identifier Code (BIC) is still in English.

Commits
-------

ca4c351 [Validator] add Indonesian translation
2016-12-14 09:12:43 +01:00
Indra Gunawan
ca4c35164f [Validator] add Indonesian translation 2016-12-14 09:12:43 +01:00
Fabien Potencier
482e9edc50 bug #20734 [Security] AbstractVoter->supportsAttribute gives false positive if attribute is zero (0) (martynas-foodpanda)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] AbstractVoter->supportsAttribute gives false positive if attribute is zero (0)

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

Issue is easy to reproduce with test giving negative data set.
0 should not pass as supported attribute for any set of attributes but it does as in_array in the method does not use flag 'strict' set to true.

As this is abstract voter and is used by users with their code flag 'strict' should be set to true.
Since is there in 2.7 and 2.8 (LTS) IMHO it should be fixed.

Commits
-------

8306530 [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
2016-12-14 09:11:55 +01:00
Fabien Potencier
92423e77ac fixed CS 2016-12-14 09:03:29 +01:00
Fabien Potencier
a7fb8c4112 bug #14082 [config] Fix issue when key removed and left value only (zerustech)
This PR was submitted for the 2.3 branch but it was merged into the 2.7 branch instead (closes #14082).

Discussion
----------

[config] Fix issue when key removed and left value only

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

When a key attribute is mapped and the key is removed from the value array, if
only 'value' element is left in the array, it should replace its wrapper
array.

Assume the original value array is as follows (key attribute is 'id').

``` php
array(
    'things' => array(
        array('id' => 'option1', 'value' => 'value1'),
        array('id' => 'option2', 'value' => 'value2')
    )
)
```

After normalized, the above shall be converted to the following array.

``` php
array(
    'things' => array(
        'option1' => 'value1',
        'option2' => 'value2'
    )
)
```

It's also possible to mix 'value-only' and 'none-value-only' elements in
the array:

``` php
array(
    'things' => array(
        array('id' => 'option1', 'value' => 'value1'),
        array('id' => 'option2', 'value' => 'value2', 'foo' => 'foo2')
    )
)
```

The above shall be converted to the following array.

``` php
array(
    'things' => array(
        'option1' => 'value1',
        'option2' => array('value' => 'value2','foo' => 'foo2')
    )
)
```

The 'value' element can also be array:

``` php
array(
    'things' => array(
        array(
            'id' => 'option1',
            'value' => array('foo'=>'foo1', 'bar' => 'bar1')
        )
    )
)
```

The above shall be converted to the following array.

``` php
array(
    'things' => array(
        'option1' => array('foo' => 'foo1', 'bar' => 'bar1')
    )
)
```

When using VariableNode for value element, it's also possible to mix
different types of value elements:

``` php
array(
    'things' => array(
        array('id' => 'option1', 'value' => array('foo'=>'foo1', 'bar' => 'bar1')),
        array('id' => 'option2', 'value' => 'value2')
    )
)
```

The above shall be converted to the following array.

``` php
array(
    'things' => array(
        'option1' => array('foo'=>'foo1', 'bar' => 'bar1'),
        'option2' => 'value2'
    )
)
```

Commits
-------

b587a72 [config] Fix issue when key removed and left value only
2016-12-14 09:02:51 +01:00
Michael Lee
b587a7294f [config] Fix issue when key removed and left value only
When a key attribute is mapped and the key is removed from the value array, if
only 'value' element is left in the array, it should replace its wrapper
array.

Assume the original value array is as follows (key attribute is 'id').

```php
array(
    'things' => array(
        array('id' => 'option1', 'value' => 'value1'),
        array('id' => 'option2', 'value' => 'value2')
    )
)
```

After normalized, the above shall be converted to the following array.

```php
array(
    'things' => array(
        'option1' => 'value1',
        'option2' => 'value2'
    )
)
```

It's also possible to mix 'value-only' and 'none-value-only' elements in
the array:

```php
array(
    'things' => array(
        array('id' => 'option1', 'value' => 'value1'),
        array('id' => 'option2', 'value' => 'value2', 'foo' => 'foo2')
    )
)
```

The above shall be converted to the following array.
```php
array(
    'things' => array(
        'option1' => 'value1',
        'option2' => array('value' => 'value2','foo' => 'foo2')
    )
)
```

The 'value' element can also be array:

```php
array(
    'things' => array(
        array(
            'id' => 'option1',
            'value' => array('foo'=>'foo1', 'bar' => 'bar1')
        )
    )
)
```
The above shall be converted to the following array.
```php
array(
    'things' => array(
        'option1' => array('foo' => 'foo1', 'bar' => 'bar1')
    )
)
```

When using VariableNode for value element, it's also possible to mix
different types of value elements:
```php
array(
    'things' => array(
        array('id' => 'option1', 'value' => array('foo'=>'foo1', 'bar' => 'bar1')),
        array('id' => 'option2', 'value' => 'value2')
    )
)
```

The above shall be converted to the following array.
```php
array(
    'things' => array(
        'option1' => array('foo'=>'foo1', 'bar' => 'bar1'),
        'option2' => 'value2'
    )
)
```

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15270
| License       | MIT
| Doc PR        | n/a
2016-12-14 09:02:51 +01:00
Fabien Potencier
917eacac25 bug #20847 [Console] fixed BC issue with static closures (araines)
This PR was squashed before being merged into the 2.8 branch (closes #20847).

Discussion
----------

[Console] fixed BC issue with static closures

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

Static closures were unable to be used in Command::setCode since #14431.  This change fixes the BC break and ensures static closures can still be used.

Edit: It seems the inability to bind static closures was considered a feature in PHP5 but was considered a bug by PHP7.  As such, the tests need to work around this fact - but the code can remain the same.  This code change can be tidied/removed once Symfony is PHP7+ only.

Discussion here:
https://bugs.php.net/bug.php?id=64761
https://bugs.php.net/bug.php?id=68792

Commits
-------

3247308 [Console] fixed BC issue with static closures
2016-12-13 18:12:26 +01:00
Andy Raines
3247308c50 [Console] fixed BC issue with static closures 2016-12-13 18:12:25 +01:00
Fabien Potencier
e221ac9df7 Merge branch '2.7' into 2.8
* 2.7:
  [Console] Review Application docblocks
  bumped Symfony version to 2.7.23
  updated VERSION for 2.7.22
  update CONTRIBUTORS for 2.7.22
  updated CHANGELOG for 2.7.22
  Update PHP CS Fixer config file
2016-12-13 16:30:11 +01:00
Fabien Potencier
79e68965c1 minor #20731 DX: Update PHP CS Fixer config file (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

DX: Update PHP CS Fixer config file

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

For a good start, updated config for php cs fixer v2.
I would guess that fabbot needs to be updated ;)

Commits
-------

a0e305b Update PHP CS Fixer config file
2016-12-13 16:29:10 +01:00
Fabien Potencier
7f85f6dc1e minor #20813 [Console] Review Application docblocks (ogizanagi)
This PR was squashed before being merged into the 2.7 branch (closes #20813).

Discussion
----------

[Console] Review Application docblocks

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

~I know there must be a lot of other places in the core where there is some repeated or useless informations in docblocks, but everytime I dig into the `Application` class, I see this, and I don't want to repeat things for consistency when adding new methods 😅  (for instance in #20808, the `setCatchThrowables / areThrowablesCaught ` methods do not need a docblock description IMHO).~

~This PR adapts docblocks where:~

- ~A docblock description is not required, as everything can be expressed in the `@return / @param` argument (the case mentioned above)~
- ~Information is redundant between description and tags, and the context does not have to be reminded again:~

```diff

    /**
     * Adds an array of command objects.
     *
     * If a Command is not enabled it will not be added.
     *
-     * @param Command[] $commands An array of commands
+     * @param Command[] $commands
     */
    public function addCommands(array $commands)
    {
        foreach ($commands as $command) {
            $this->add($command);
        }
    }
```

Commits
-------

d8c18cc [Console] Review Application docblocks
2016-12-13 16:27:53 +01:00
Maxime STEINHAUSSER
d8c18cc3cd [Console] Review Application docblocks 2016-12-13 16:27:52 +01:00
Fabien Potencier
a163a16554 bumped Symfony version to 2.8.16 2016-12-13 13:44:14 +01:00
Fabien Potencier
3ec15b9379 Merge pull request #20892 from fabpot/release-2.8.15
released v2.8.15
2016-12-13 13:16:34 +01:00
Fabien Potencier
5b5311c130 updated VERSION for 2.8.15 2016-12-13 13:16:15 +01:00
Fabien Potencier
42fbabd470 updated CHANGELOG for 2.8.15 2016-12-13 13:16:09 +01:00
Fabien Potencier
f22a505629 bumped Symfony version to 2.7.23 2016-12-13 13:12:22 +01:00
Fabien Potencier
4b0fd9881d Merge pull request #20890 from fabpot/release-2.7.22
released v2.7.22
2016-12-13 11:53:44 +01:00
Fabien Potencier
bdb6bf985f updated VERSION for 2.7.22 2016-12-13 11:53:27 +01:00