Commit Graph

23200 Commits

Author SHA1 Message Date
Fabien Potencier
a515383611 bug #17819 [HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method (jakzal)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method

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

I just suffered from this bug on a project that used HttpKernelInterface implementation with no `terminateWithException() method (which is not part of the interface).

Commits
-------

2849152 [HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method
2016-02-17 07:06:50 +01:00
Christian Flothmann
f87558d05e [Form] fix violation mapper tests
This takes into account the changes to the `getErrors()` in Symfony 2.5
(the method rturns a `FormErrorIterator` instead of an array) as well as
the fact that non-submitted forms do not accept errors since #10567
anymore.
2016-02-16 20:52:17 +01:00
Jakub Zalas
2849152c5e [HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method 2016-02-16 16:51:17 +00:00
Christian Flothmann
1c79c7b234 Merge branch '2.3' into 2.7
* 2.3:
  don't rely on deprecated YAML parser feature
2016-02-16 10:30:21 +01:00
Christian Flothmann
1dcf83c35b minor #17816 [DependencyInjection] don't rely on deprecated YAML parser feature (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] don't rely on deprecated YAML parser feature

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

see [failing tests for the 2.7 branch](https://travis-ci.org/symfony/symfony/jobs/109537695#L2238)

Commits
-------

c8d387f don't rely on deprecated YAML parser feature
2016-02-16 10:29:38 +01:00
Christian Flothmann
c8d387f131 don't rely on deprecated YAML parser feature 2016-02-16 09:57:10 +01:00
Fabien Potencier
1af6e98851 Merge branch '2.3' into 2.7
* 2.3:
  fix YAML syntax in functional tests config
2016-02-16 08:15:42 +01:00
Fabien Potencier
9b093c9744 minor #17810 fix YAML syntax in functional tests config (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

fix YAML syntax in functional tests config

| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT

see failing tests in #17809

Commits
-------

d9af4bc fix YAML syntax in functional tests config
2016-02-16 08:14:17 +01:00
Fabien Potencier
a6e934c0ca minor #17811 [FrameworkBundle] fix YAML syntax (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] fix YAML syntax

| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT

see failing tests in #17809

Commits
-------

2da4038 [FrameworkBundle] fix YAML syntax
2016-02-16 08:13:32 +01:00
Fabien Potencier
457967c6c7 Merge branch '2.3' into 2.7
* 2.3:
  [DependencyInjection] fix dumped YAML snytax
  Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode. In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
  [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
  [TwigBridge] Symfony 3.1 forward compatibility
2016-02-16 07:07:10 +01:00
Fabien Potencier
3f749d6559 bug #17814 [DependencyInjection] fix dumped YAML snytax (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] fix dumped YAML snytax

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

see the failing tests in #17809

Commits
-------

30388f1 [DependencyInjection] fix dumped YAML snytax
2016-02-16 07:02:27 +01:00
Christian Flothmann
30388f17ff [DependencyInjection] fix dumped YAML snytax 2016-02-15 22:04:15 +01:00
Fabien Potencier
f6e401a973 minor #17707 Remove InputOption::VALUE_REQUIRED mode from $default parameter description (tomasliubinas)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17707).

Discussion
----------

Remove InputOption::VALUE_REQUIRED mode from $default parameter description

Reopening previous PR, providing more information

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

Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called with InputOption::VALUE_NONE mode.
In practice the $default not null value could be still used in VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method.

There is an important difference between 2 concepts. Not required Option AND not required option Value. When the not required Option is not provided the default value still could be taken from required option Value instance.

Relevant (correct) test case:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php#L136

Commits
-------

3c06151 Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode. In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
2016-02-15 20:17:39 +01:00
Tomas Liubinas
3c0615141e Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode.
In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
2016-02-15 20:17:39 +01:00
Christian Flothmann
2da40382ab [FrameworkBundle] fix YAML syntax 2016-02-15 19:07:52 +01:00
Christian Flothmann
d9af4bc606 fix YAML syntax in functional tests config 2016-02-15 19:05:26 +01:00
Fabien Potencier
d4ac467462 bug #17099 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path (alekitto)
This PR was squashed before being merged into the 2.3 branch (closes #17099).

Discussion
----------

[Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path

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

Commits
-------

f005c80 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
2016-02-15 10:19:57 +01:00
Alessandro Chitolina
f005c80bc5 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path 2016-02-15 10:19:56 +01:00
Fabien Potencier
52343b02b7 bug #17694 [2.7] [DoctrineBridge] [Form] fix choice_value in EntityType (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] [DoctrineBridge] [Form] fix choice_value in EntityType

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17693, #17271, #13964
| License       | MIT
| Doc PR        | symfony/symfony-docs#6260

Commits
-------

2336d5c fix choice_value option in EntityType and add some tests
2016-02-15 09:11:42 +01:00
Fabien Potencier
a966a8819d minor #17780 [TwigBridge] Symfony 3.1 forward compatibility (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBridge] Symfony 3.1 forward compatibility

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

Commits
-------

2991639 [TwigBridge] Symfony 3.1 forward compatibility
2016-02-14 14:09:49 +01:00
Fabien Potencier
dc59e42257 Merge branch '2.3' into 2.7
* 2.3:
  [Form] [Validator] Fix locale inconsistencies in Norwegian translations
  fixed CS
  [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
  [Form] remove useless code in ResizeFormListener
2016-02-14 14:08:36 +01:00
Fabien Potencier
10ba63cb5e minor #17785 [Form] [Validator] Fix locale inconsistencies for Norwegian translations (valisj)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #17785).

Discussion
----------

[Form] [Validator] Fix locale inconsistencies for Norwegian translations

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

Bokmål is the preferred written standard of Norwegian for 85% to 90% of the population of Norway. It is therefore not entirely correct that the current translation of English in Nynorsk is the default one (`no` locale) for the Validator component.

This also creates inconsistency in Norwegian translations as other translations with the `no` locale are actually in Bokmål in the Form component, meaning that different written standards would be rendered in the same page.

In this PR, the filenames for translations are changed in such a way that Bokmål will be the default translation for the `no` locale, and nynorsk for the `nn` locale.

Renaming of `validators.nb.xlf` to `validators.no.xlf` (in Form component) will, however, lead to missing translations for those who relied on the `nb` locale for Bokmål. One solution is to have 2 exact translation files - validators.no.xlf and validators.nb.xlf - to avoid this problem.

Renaming of `validators.no.xlf` (which is currently in Nynorsk `nn`) to `validators.nn.xlf` (in Validator component) must be done in order to make the relation between translation content and locales consistent. I don't think this will lead to any major problems, since people expect to have Bokmål as the default translation.

Any thoughts?

Commits
-------

67d343f Fix locale and written standard inconsistencies for Norwegian translations
2016-02-14 14:07:55 +01:00
Valentin Jonovs
67d343fd69 Fix locale and written standard inconsistencies for Norwegian translations 2016-02-14 14:07:55 +01:00
Fabien Potencier
1229b6d9b9 minor #17795 [Form] [Validator] Fix locale inconsistencies in Norwegian translations (valisj)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] [Validator] Fix locale inconsistencies in Norwegian translations

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

See #17785

Commits
-------

ab2ac93 [Form] [Validator] Fix locale inconsistencies in Norwegian translations
2016-02-14 14:06:33 +01:00
Valentin Jonovs
ab2ac93a45 [Form] [Validator] Fix locale inconsistencies in Norwegian translations
| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | N/A
| License       | MIT
2016-02-14 12:22:09 +01:00
Christian Flothmann
29916394f8 [TwigBridge] Symfony 3.1 forward compatibility 2016-02-14 11:52:08 +01:00
Fabien Potencier
55b71ebd93 fixed CS 2016-02-14 11:04:53 +01:00
Fabien Potencier
ee01786dbd bug #17719 [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder (lukaszmakuch)
This PR was squashed before being merged into the 2.3 branch (closes #17719).

Discussion
----------

[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder

[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder

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

The ContainerBuilder class wasn't implementing the ContainerInterface interface as it should according to the Liskov substitution principle.

It caused dependency on implementation instead than on the interface when using an instance of the ContainerBuilder class.

For example this code:
```php
<?php
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
use Symfony\Component\DependencyInjection\ContainerInterface;

/* @var $container ContainerInterface */
try {
    $container->get("wrong_service_key");
} catch (ServiceNotFoundException $e) {
    //action on a wrong key
}
```
works for correct implementations of the ContainerInterface interface, but the ContainerBuilder class was breaking that by throwing more abstract exceptions.

As the ServiceNotFoundException exceptions inherits from the InvalidArgumentException exception, this change shouldn't break code which catches the InvalidArgumentException exception while fetching values from a ContainerInterface interface implementation.

Commits
-------

aecb0fa [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
2016-02-14 11:03:23 +01:00
Łukasz Makuch
aecb0fae3a [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder 2016-02-14 11:03:21 +01:00
Fabien Potencier
2ac436c9ae minor #17792 [Form] remove useless code in ResizeFormListener (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] remove useless code in ResizeFormListener

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

Commits
-------

088c20c [Form] remove useless code in ResizeFormListener
2016-02-14 11:00:47 +01:00
Tobias Schultze
088c20c9b3 [Form] remove useless code in ResizeFormListener 2016-02-13 18:06:22 +01:00
Tobias Schultze
0efbc30304 [Form] fix edge cases with choice placeholder 2016-02-13 13:18:37 +01:00
Nicolas Grekas
ec7b3f2053 Merge branch '2.3' into 2.7
* 2.3:
  [DomCrawler] Clarify the value returned by getPhpFiles()
  [DependencyInjection] Fix #16461 Let Container::set() replace existing aliases
  Added more exceptions to singularify method
2016-02-13 10:21:13 +01:00
Fabien Potencier
80e08d33e4 minor #17781 [VarDumper] Fix tests on PHP 7 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix tests on PHP 7

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

Supersedes #17775

Commits
-------

5d433ca [VarDumper] Fix tests on PHP 7
2016-02-13 06:26:59 +01:00
Nicolas Grekas
5d433cab96 [VarDumper] Fix tests on PHP 7 2016-02-12 18:39:33 +01:00
Fabien Potencier
1be2d34e16 minor #17776 [DomCrawler] Clarify the value returned by getPhpFiles() (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Clarify the value returned by getPhpFiles()

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

The comment was previously suggesting the returned value is similar to the one stored in $_FILES, while it is more similar to the way PHP stores submitted form values. It is actually more convenient to have it this way, so rather then changing the returned value (which would break BC), it is better to clarify the comment.

Commits
-------

a694401 [DomCrawler] Clarify the value returned by getPhpFiles()
2016-02-12 17:13:24 +01:00
Jakub Zalas
a694401e35 [DomCrawler] Clarify the value returned by getPhpFiles()
The comment was previously suggesting the returned value is similar to the one stored in $_FILES, while it is more similar to the way PHP stores submitted form values. It is actually more convenient to have it this way, so rather then changing the returned value (which would break BC), it is better to clarify the comment.
2016-02-12 10:10:06 +00:00
Fabien Potencier
2799b1cf04 bug #17742 [DependencyInjection] Fix #16461 Container::set() replace aliases (mnapoli)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17742).

Discussion
----------

[DependencyInjection] Fix #16461 Container::set() replace aliases

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

`Container::set()` now overrides any previously alias defined with the same name. Please see #16461 for the background.

Example:

- given `event_dispatcher` is an alias to `debug.event_dispatcher`
- when I run: `$container->set('event_dispatcher', new FakeEventDispatcher)`
- *before this patch*: nothing happens
- *after this patch*: the `event_dispatcher` is now my fake event dispatcher

Commits
-------

be85d16 [DependencyInjection] Fix #16461 Let Container::set() replace existing aliases
2016-02-12 09:48:06 +01:00
Matthieu Napoli
be85d16940 [DependencyInjection] Fix #16461 Let Container::set() replace existing aliases
`Container::set()` now overrides any previously alias defined with the same name.
2016-02-12 09:48:06 +01:00
Fabien Potencier
92d291a17c bug #17745 Added more exceptions to singularify method (javiereguiluz)
This PR was merged into the 2.3 branch.

Discussion
----------

Added more exceptions to singularify method

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

Added exceptions for `series`, `news` and `services`.

Commits
-------

f5daa0d Added more exceptions to singularify method
2016-02-12 07:37:13 +01:00
Fabien Potencier
ca6f1f7428 bug #17691 Fixed (string) catchable fatal error for PHP Incomplete Class instances (yceruto)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #17691).

Discussion
----------

Fixed (string) catchable fatal error for PHP Incomplete Class instances

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

Commits
-------

4b7ed98 avoid (string) catchable fatal error for instances of __PHP_Incomplete_Class
2016-02-12 07:25:11 +01:00
Yonel Ceruto
4b7ed987dd avoid (string) catchable fatal error for instances of __PHP_Incomplete_Class 2016-02-12 07:25:11 +01:00
Fabien Potencier
4598b74906 Merge branch '2.3' into 2.7
* 2.3:
  remove unnecessary retrieval and setting of data
  avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
  sendContent return as parent.
  [FrameworkBundle] Fix a typo
2016-02-12 07:23:50 +01:00
Fabien Potencier
81d654fb5c bug #17766 Fixed (string) catchable fatal error for PHP Incomplete Class instances (yceruto)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed (string) catchable fatal error for PHP Incomplete Class instances

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

Fixing for 2.3 branch.

Commits
-------

bb29979 avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
2016-02-12 07:16:22 +01:00
Tobias Schultze
d0324e4795 minor #17763 Remove unnecessary retrieval and setting of data (Trent Steel)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #17763).

Discussion
----------

Remove unnecessary retrieval and setting of data

| Q             | A
| ------------- | ---
| Bug fix?      | No
| New feature?  | No - optimisation
| BC breaks?    | No
| Deprecations? | No
| Tests pass?   | Yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | None

Commits
-------

ea52400 remove unnecessary retrieval and setting of data
2016-02-12 00:13:45 +01:00
Trent Steel
ea52400097 remove unnecessary retrieval and setting of data 2016-02-12 00:13:18 +01:00
Yonel Ceruto
bb29979218 avoid (string) catchable fatal error for __PHP_Incomplete_Class instances 2016-02-11 09:15:16 -05:00
Fabien Potencier
730a472721 bug #17757 [HttpFoundation] BinaryFileResponse sendContent return as parent. (2.3) (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] BinaryFileResponse sendContent return as parent. (2.3)

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

`BinaryFileResponse` extends `Response` and overrides the `sendContent`-method. It would be nice if it also returns as the parent does, i.e. itself. This makes it easier to deal with diff. `Response` classes.
The other fixes are to make SCA easier. No BC-breaks AFAIK.

Commits
-------

120dfe4 sendContent return as parent.
2016-02-11 10:27:07 +01:00
Jules Pietri
2336d5c466 fix choice_value option in EntityType
and add some tests
2016-02-11 01:55:30 +01:00
possum
120dfe48a6 sendContent return as parent. 2016-02-10 20:09:02 +01:00