Commit Graph

23231 Commits

Author SHA1 Message Date
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
Christian Flothmann
bb85161de9 minor #17747 [FrameworkBundle] Fix a typo (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix a typo

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

Commits
-------

89133e6 [FrameworkBundle] Fix a typo
2016-02-10 12:08:23 +01:00
Jakub Zalas
89133e6a71 [FrameworkBundle] Fix a typo 2016-02-10 10:18:08 +00:00
Javier Eguiluz
f5daa0dea9 Added more exceptions to singularify method 2016-02-09 22:08:46 +01:00
Nicolas Grekas
ae0b5fa382 Merge branch '2.3' into 2.7
* 2.3:
  [TwigBridge] forward compatibility with Yaml 3.1
2016-02-05 12:35:20 +01:00
Nicolas Grekas
01b562b2cd bug #17702 [TwigBridge] forward compatibility with Yaml 3.1 (xabbuh)
This PR was submitted for the 3.0 branch but it was merged into the 2.3 branch instead (closes #17702).

Discussion
----------

[TwigBridge] forward compatibility with Yaml 3.1

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

Commits
-------

047c195 [TwigBridge] forward compatibility with Yaml 3.1
2016-02-05 12:33:25 +01:00
Christian Flothmann
047c1953d2 [TwigBridge] forward compatibility with Yaml 3.1 2016-02-05 12:33:24 +01:00
Nicolas Grekas
927fe13af2 Merge branch '2.3' into 2.7
* 2.3:
  [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors
2016-02-04 15:43:56 +01:00
Nicolas Grekas
2573a380f8 minor #17686 [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors

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

E.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.5754#L1525

Commits
-------

1d4ea39 [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors
2016-02-04 15:43:31 +01:00
Nicolas Grekas
1d4ea39512 [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors 2016-02-04 15:25:59 +01:00
Nicolas Grekas
3af65d72ec Merge branch '2.3' into 2.7
* 2.3:
  add files used in FileResource objects
2016-02-04 14:52:46 +01:00
Nicolas Grekas
876bad9730 bug #17672 [DependencyInjection][Routing] add files used in FileResource objects (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection][Routing] add files used in FileResource objects

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

Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.

Commits
-------

4f865c7 add files used in FileResource objects
2016-02-04 14:49:46 +01:00
Nicolas Grekas
fc939580ab Merge branch '2.3' into 2.7
* 2.3:
  [travis] Add some comments
  changed operator from and to &&

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php
2016-02-04 13:09:54 +01:00
Fabien Potencier
a1e4560cf5 minor #17664 [Routing] added a suggestion to add the HttpFoundation component. (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] added a suggestion to add the HttpFoundation component.

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

Commits
-------

a45e8bb [Routing] added a suggestion to add the HttpFoundation component.
2016-02-04 08:01:18 +01:00
Fabien Potencier
9983cfbdc8 bug #17600 Fixed the Bootstrap form theme for inlined checkbox/radio (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixed the Bootstrap form theme for inlined checkbox/radio

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

@qferr provided the solution for this bug. I only verified it and created the PR.

@aderuwe @JHGitty @tjaadvd all of you took part in the original discussion. Could you please verify if this change fixes your issues? Thanks.

Commits
-------

cb1a921 Fixed the Bootstrap form theme for inlined checkbox/radio
2016-02-04 07:16:44 +01:00
Christian Flothmann
4f865c758a add files used in FileResource objects
Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.
2016-02-03 19:52:07 +01:00
Hugo Hamon
a45e8bbc34 [Routing] added a suggestion to add the HttpFoundation component. 2016-02-03 14:12:30 +02:00
Nicolas Grekas
a842eda0ec minor #17653 changed operator from and to && (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

changed operator from and to &&

| 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

Commits
-------

c718401 changed operator from and to &&
2016-02-03 09:16:49 +01:00
Nicolas Grekas
3f22dac6fe minor #17655 [travis] Add some comments (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Add some comments

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

Commits
-------

13ae323 [travis] Add some comments
2016-02-03 09:15:53 +01:00
Nicolas Grekas
13ae32376d [travis] Add some comments 2016-02-02 17:51:37 +01:00