Commit Graph

27928 Commits

Author SHA1 Message Date
Fabien Potencier 96e7dede3d Merge pull request #21441 from fabpot/release-3.1.10
released v3.1.10
2017-01-27 18:53:38 -08:00
Fabien Potencier 3b108a146b updated VERSION for 3.1.10 2017-01-27 18:53:17 -08:00
Fabien Potencier 95fa3a7f4d update CONTRIBUTORS for 3.1.10 2017-01-27 18:53:16 -08:00
Fabien Potencier 495eb2ec5f updated CHANGELOG for 3.1.10 2017-01-27 18:53:10 -08:00
Fabien Potencier dba3e75fb2 fixed composer dep 2017-01-27 18:42:42 -08:00
Fabien Potencier 537b932302 fixed typo 2017-01-27 16:27:58 -08:00
Fabien Potencier f904f0406d Merge branch '2.8' into 3.1
* 2.8:
  fixed composer.json
2017-01-27 16:21:39 -08:00
Fabien Potencier 4b5930ca44 fixed composer.json 2017-01-27 16:19:36 -08:00
Fabien Potencier e8895ad102 Merge branch '2.8' into 3.1
* 2.8:
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 16:04:57 -08:00
Fabien Potencier 791b143914 Merge branch '2.7' into 2.8
* 2.7:
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 15:54:58 -08:00
Fabien Potencier bc391c130e bug #21431 [DoctrineBridge] always check for all fields to be mapped (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] always check for all fields to be mapped

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

Commits
-------

1e3421d6f0 always check for all fields to be mapped
2017-01-27 07:29:46 -08:00
Christian Flothmann 1e3421d6f0 always check for all fields to be mapped 2017-01-27 10:14:45 +01:00
Fabien Potencier a35986f657 minor #21416 [DependencyInjection] clarify exception when no args are configured (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] clarify exception when no args are configured

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

Commits
-------

428814b25d clarify exception when no args are configured
2017-01-26 07:56:09 -08:00
Christian Flothmann 428814b25d clarify exception when no args are configured 2017-01-26 11:48:39 +01:00
Fabien Potencier a6d2420f00 bug #21360 [PropertyAccess] Handle interfaces in the invalid argument exception (fancyweb)
This PR was squashed before being merged into the 2.7 branch (closes #21360).

Discussion
----------

[PropertyAccess] Handle interfaces in the invalid argument exception

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

Before :
`Expected argument of type "dule\MenuBundle\Entity\AbstractMenu::setMenuElements() must implement interface Doctrine\Common\Collections\Collection", "array" given`

After :
`Expected argument of type "Doctrine\Common\Collections\Collection", "array" given`

Commits
-------

be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception
2017-01-25 07:13:56 -08:00
Thomas Calvet be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception 2017-01-25 07:13:54 -08:00
Fabien Potencier 21f1be16d5 bug #21403 [DI] Fix defaults overriding empty strings in AutowirePass (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Fix defaults overriding empty strings in AutowirePass

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

Commits
-------

89e27240ab [DI] Fix defaults overriding empty strings in AutowirePass
2017-01-25 07:08:36 -08:00
Fabien Potencier 74ee29dc2f bug #21401 [Debug] Workaround "null" $context (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Workaround "null" $context

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

As reported in #20068, the imap extension can call error handlers with $context = null.

Commits
-------

2555f3151d [Debug] Workaround "null" $context
2017-01-25 07:05:34 -08:00
Nicolas Grekas 89e27240ab [DI] Fix defaults overriding empty strings in AutowirePass 2017-01-25 13:37:59 +01:00
Nicolas Grekas 2555f3151d [Debug] Workaround "null" $context 2017-01-25 13:11:45 +01:00
Fabien Potencier dd4e78c96d minor #21379 [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling

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

This fixes a BC break introduced in #21333. Instead of removing the automatic request attributes creation, we keep it but only for attributes that are mandatory (i.e. present in the route path).

Thanks to @iltar for the idea.

Commits
-------

1d298f0417 [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
2017-01-24 08:26:17 -08:00
Fabien Potencier 388be9dc3a minor #21320 Fix ICU dependant tests (jakzal)
This PR was squashed before being merged into the 2.7 branch (closes #21320).

Discussion
----------

Fix ICU dependant tests

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

#20551 changed the condition checking if the ICU version matches the stubbed data. The change intended to enable tests on more ICU versions, but it actually has limited them. I'm still not convinced it should've been done but let's at least fix the condition. Ideal solution would be to have the latest ICU data available on travis (still not there https://github.com/travis-ci/travis-ci/issues/3616).

I also needed to fix several tests.

Currently skipped tests in components depending on ICU data:

|            | 4.8.1.1 | 54.1 | 55.1 | 57.1 |
|---|---|--|--|--|
| Intl       | 488     | 488  | 7    | 6    |
| Locale     | 0       | 0    | 0    | 0    |
| Translation| 0       | 0    | 0    | 0    |
| Validator  | 69      | 69   | 69   | 0    |
| Form       | 75      | 75   | 75   | 1    |

Commits
-------

d3b5d8efdf Fix tests with ICU 57.1
677d820874 Fix the condition checking the minimum ICU version
2017-01-24 07:57:42 -08:00
Fabien Potencier 0292cf2e00 minor #21389 [Debug] Remove $context arg from handleError(), preparing for PHP 7.2 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Remove $context arg from handleError(), preparing for PHP 7.2

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

PHP 7.2 will trigger deprecation notices.
See https://wiki.php.net/rfc/deprecations_php_7_2#errcontext_argument_of_error_handler

Commits
-------

83cad14612 [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
2017-01-24 07:54:48 -08:00
Nicolas Grekas 83cad14612 [Debug] Remove $context arg from handleError(), preparing for PHP 7.2 2017-01-24 16:28:42 +01:00
Nicolas Grekas 7fa7aeba0c Merge branch '2.8' into 3.1
* 2.8:
  fix test
2017-01-24 14:02:38 +01:00
Nicolas Grekas c56f547c7d fix test 2017-01-24 14:02:12 +01:00
Nicolas Grekas dd42d72eb5 minor #21309 [Serializer] Add missing conflict for property-info<3.1 (chalasr)
This PR was merged into the 3.1 branch.

Discussion
----------

[Serializer] Add missing conflict for property-info<3.1

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

Commits
-------

60a0c4b [Serializer] Add missing conflict for property-info<3.1
2017-01-24 13:51:25 +01:00
Robin Chalas 1d298f0417
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling 2017-01-23 21:38:04 +01:00
Nicolas Grekas 4268abacf4 Merge branch '2.8' into 3.1
* 2.8:
  update German translation
  [Validator] Improved error message for missing upload_tmp_dir
2017-01-23 09:25:24 +01:00
Nicolas Grekas 3faf655638 Merge branch '2.7' into 2.8
* 2.7:
  update German translation
  [Validator] Improved error message for missing upload_tmp_dir
2017-01-23 09:25:05 +01:00
Nicolas Grekas e95fc09b3c fix getMock usage 2017-01-23 09:24:39 +01:00
Fabien Potencier ed5eb6db54 bug #21372 [DependencyInjection] Fixed variadic method parameter in autowired classes (brainexe)
This PR was squashed before being merged into the 3.1 branch (closes #21372).

Discussion
----------

[DependencyInjection] Fixed variadic method parameter in autowired classes

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

Autowiring classes containing methods with variadic method parameter throws a ReflectionException in compile process:

```
PHP Fatal error:  Uncaught ReflectionException: Internal error: Failed to retrieve the default value in /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php:437
Stack trace:
#0 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(437): ReflectionParameter->getDefaultValue()
#1 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(80): Symfony\Component\DependencyInjection\Compiler\AutowirePass::getResourceMetadataForMethod(Object(ReflectionMethod))
#2 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(105): Symfony\Component\DependencyInjection\Compiler\AutowirePass::createResourceForClass(Object(ReflectionClass))
#3 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(48): Symfony\Component\DependencyInjection\Compiler\AutowirePass->completeDefinition('__controller.Sw...', Object(Symfony\Component\DependencyInjection\Definition), Array)
#4 /.../vendor/symfony/dependency-injection/Compiler/Compiler in /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php on line 437
```

**Example:**
```
<?php
class FooVariadic
{
    public function bar(...$arguments)
    {
    }
}

$method = new ReflectionMethod(FooVariadic::class, 'bar');
$parameter = $method->getParameters()[0];
$parameter->getDefaultValue(); // -> ReflectionException: Internal error: Failed to retrieve the default value in ...
```

Commits
-------

a7f63de414 [DependencyInjection] Fixed variadic method parameter in autowired classes
2017-01-22 12:28:23 -08:00
matze a7f63de414 [DependencyInjection] Fixed variadic method parameter in autowired classes 2017-01-22 12:28:21 -08:00
Fabien Potencier 9ef427150c minor #21371 [Validator] update German translation (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] update German translation

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

f920e61d35 update German translation
2017-01-22 08:17:47 -08:00
Christian Flothmann f920e61d35 update German translation 2017-01-22 08:38:04 +01:00
Fabien Potencier 41c72ab909 minor #21335 [Validator] Improved error message for missing upload_tmp_dir (Breuls)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Improved error message for missing upload_tmp_dir

| 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 ran into a problem in which the value for upload_tmp_dir was set in php.ini, but PHP was unable to write to the specified location. PHP returns an UPLOAD_ERR_NO_TMP_DIR in $_FILES when it can't find or use the tmp dir, and my application displayed the error for $uploadNoTmpDirErrorMessage, from which I drew the conclusion that the ini setting was missing or emtpy.

This conclusion was based on the wording in the error message, which explicitly states that 'no temporary folder was configured', which is not actually correct. According to the [PHP documentation](http://php.net/manual/en/features.file-upload.errors.php):

> UPLOAD_ERR_NO_TMP_DIR
> Value: 6; Missing a temporary folder. Introduced in PHP 5.0.3.

'Missing' might be interpreted as 'the value for the ini setting is missing', but also as 'the configured folder is missing'.

I thought it might save someone some time if the error message from the Symfony Validator makes this explicit, which is what this PR aims to do.

I also updated the Dutch and Polish translations, because those, in addition to English, are the languages spoken in my team.

Commits
-------

afbf22746a [Validator] Improved error message for missing upload_tmp_dir
2017-01-21 10:14:52 -08:00
Fabien Potencier e3dcde7b8a fixed CS 2017-01-21 09:13:55 -08:00
Fabien Potencier 20bdaa6cc5 Merge branch '2.8' into 3.1
* 2.8: (26 commits)
  fixed CS
  fixed CS
  fixed CS fixer config
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [PropertyInfo] Don't try to access a property thru a static method
  [PropertyInfo] Exclude static methods form properties guessing
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [TwigBundle] do not lose already set method calls
  #20411 fix Yaml parsing for very long quoted strings
  CS: apply is_null
  DX: remove invalid inheritdoc
  bumped Symfony version to 2.8.17
  updated VERSION for 2.8.16
  ...
2017-01-21 09:01:39 -08:00
Fabien Potencier 4a46c6ff13 fixed CS 2017-01-21 08:59:38 -08:00
Fabien Potencier 2d0634d941 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  fixed CS fixer config
2017-01-21 08:53:15 -08:00
Fabien Potencier b6507c8c1c fixed CS 2017-01-21 08:52:33 -08:00
Fabien Potencier 2ff6f445bc fixed CS fixer config 2017-01-21 08:45:58 -08:00
Fabien Potencier a784d5c01f Merge branch '2.7' into 2.8
* 2.7:
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [TwigBundle] do not lose already set method calls
  #20411 fix Yaml parsing for very long quoted strings
  CS: apply is_null
  DX: remove invalid inheritdoc
  bumped Symfony version to 2.7.24
  updated VERSION for 2.7.23
  update CONTRIBUTORS for 2.7.23
  updated CHANGELOG for 2.7.23
  [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
2017-01-21 08:40:50 -08:00
Fabien Potencier d103b61420 fixed typo 2017-01-21 08:37:56 -08:00
Fabien Potencier 735d0a6ce7 Revert "fixed typo"
This reverts commit 6830d9f4c9.
2017-01-21 08:37:26 -08:00
Fabien Potencier 2b317c1de1 minor #21363 CS fixes (fabpot)
This PR was squashed before being merged into the 2.7 branch (closes #21363).

Discussion
----------

CS fixes

| 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

Commits
-------

6830d9f4c9 fixed typo
5176f978bf fixed CS
2017-01-21 08:34:55 -08:00
Fabien Potencier 6830d9f4c9 fixed typo 2017-01-21 08:33:48 -08:00
Peter Breuls afbf22746a [Validator] Improved error message for missing upload_tmp_dir 2017-01-21 09:48:33 +01:00
Fabien Potencier 5176f978bf fixed CS 2017-01-20 08:54:19 -08:00
Fabien Potencier 77289b9023 bug #21333 [HttpKernel] Fix ArgumentValueResolver for arguments default null (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix ArgumentValueResolver for arguments default null

| 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

If an argument has `null` as default value __and annotations are used for routing__, then it is not resolved by the ArgumentResolver e.g:

```php

public function showAction(Request $request) {
   dump($request); // Request object
}

public function showAction(?Request $request) {
   dump($request); // Request object
}

public function showAction(Request $request = null) {
   dump($request); // null
}
```
To me, the last example should have been a Request object too.

Note that it is the same behavior when using `UserInterface` or whatever, I ran into this issue while trying to dump a user for a route accepting both anonymous and authenticated requests, the argument was always null while `$this->getUser()` returned the expected value. According to http://symfony.com/blog/new-in-symfony-3-2-user-value-resolver-for-controllers it should have worked through the argument.

I propose to make it works as a bugfix.
Any suggestion for improving the patch will be really welcomed. ping @iltar

Commits
-------

d3fa8a1859 Avoid setting request attributes from signature arguments in AnnotationClassLoader
2017-01-19 09:09:26 -08:00