Commit Graph

18325 Commits

Author SHA1 Message Date
Fabien Potencier
56d3c264a9 bug #18358 [Form] NumberToLocalizedStringTransformer should return floats when possible (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] NumberToLocalizedStringTransformer should return floats when possible

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

Commits
-------

f5ed09c [Form] NumberToLocalizedStringTransformer should return floats when possible
2016-03-30 15:48:39 +02:00
Fabien Potencier
39b164219b bug #17926 [DependencyInjection] Enable alias for service_container (hason)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Enable alias for service_container

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

Commits
-------

6161438 [DependencyInjection] Enabled alias for service_container
2016-03-30 12:50:22 +02:00
Fabien Potencier
3c3e543fb1 bug #18336 [Debug] Fix handling of php7 throwables (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Debug] Fix handling of php7 throwables

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

Should not be merged into 2.7 because 2.7 already has the required logic.

Commits
-------

b032096 [Debug] Fix handling of php7 throwables
2016-03-30 12:04:02 +02:00
Fabien Potencier
eb06632b1d minor #18361 Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes

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

github.com should be more reliable

Commits
-------

8814ed0 [ci] Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes
2016-03-30 12:01:59 +02:00
Nicolas Grekas
8814ed023d [ci] Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes 2016-03-30 11:42:40 +02:00
Nicolas Grekas
b032096763 [Debug] Fix handling of php7 throwables 2016-03-30 11:02:35 +02:00
Nicolas Grekas
f5ed09c64c [Form] NumberToLocalizedStringTransformer should return floats when possible 2016-03-30 09:21:26 +02:00
Fabien Potencier
8110612a46 minor #18348 [Process] remove dead code (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] remove dead code

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

Commits
-------

d5e8f6f [Process] remove dead code
2016-03-29 22:11:02 +02:00
Nicolas Grekas
d5e8f6f20a [Process] remove dead code 2016-03-29 16:17:20 +02:00
Christian Flothmann
eca25ba3ea minor #18325 [Form] cs fixes in date types (HeahDude)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] cs fixes in date types

| Q             | A
| ------------- | ---
| Branch?       | 2.3+
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| License       | MIT
| Doc PR        | ~

Commits
-------

bc21828 [Form] cs fixes in date types
2016-03-29 15:20:02 +02:00
Tobias Schultze
666dc41d0e bug #18312 [ClassLoader] Fix storing not-found classes in APC cache (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] Fix storing not-found classes in APC cache

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

Commits
-------

106ed06 [ClassLoader] Fix storing not-found classes in APC cache
2016-03-28 21:27:59 +02:00
Nicolas Grekas
106ed0660c [ClassLoader] Fix storing not-found classes in APC cache 2016-03-28 10:34:42 +02:00
Jules Pietri
bc21828838 [Form] cs fixes in date types 2016-03-27 14:59:14 +02:00
Fabien Potencier
bbf00d22dc minor #18304 [phpunit] disable prophecy (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[phpunit] disable prophecy

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

Both Prophecy and Symfony require some phpdocumentor dependencies, but incompatible versions.
Since we don't use Prophecy, let's disable it.
phpunit-mock-objects is forced to v3.1.1 until we fix our test suite (see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/299).

Commits
-------

ae9bae7 [phpunit] disable prophecy
2016-03-27 12:05:51 +02:00
Fabien Potencier
09cc0b20d5 bug #18255 [HttpFoundation] Fix support of custom mime types with parameters (Ener-Getick)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix support of custom mime types with parameters

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/FriendsOfSymfony/FOSRestBundle/issues/1399
| License       | MIT

When using mime types with parameters, ``getFormat`` won't return the expected format as illustrated:
```php
$request = new Request();
$request->setFormat('custom', 'app/foo;param=bar');

$request->getFormat('app/foo;param=bar');
// will return null as the parameters are removed
```

So my proposal is to search the format corresponding to a mime type with its raw value or with the its parameters removed.

Commits
-------

f7ad285 [Request] Fix support of custom mime types with parameters
2016-03-25 17:26:41 +01:00
Ener-Getick
f7ad285746 [Request] Fix support of custom mime types with parameters 2016-03-25 17:13:36 +01:00
Nicolas Grekas
ae9bae7e16 [phpunit] disable prophecy 2016-03-25 10:58:58 +01:00
Nicolas Grekas
37dd041cda minor #18306 [2.3] fix mocks (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] fix mocks

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

* fix a typo in a method name (`setResponse` instead of `seetResopnse`)
* fix mocking a method that is not part of the `DomainObjectInterface`

Commits
-------

c211523 fix mocks
2016-03-25 10:57:13 +01:00
Christian Flothmann
c211523f6e fix mocks
* fix a typo in a method name (`setResponse` instead of `seetResopnse`)
* fix mocking a method that is not part of the `DomainObjectInterface`
2016-03-25 10:45:26 +01:00
Tobias Schultze
89f1c35e58 minor #18291 Fix copy-paste in PHPDoc comment text (guilliamxavier)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix copy-paste in PHPDoc comment text

| Q             | A
| ------------- | ---
| Branch?       | 2.3+ (actually all branches from 2.0)
| License       | MIT

In http://api.symfony.com/2.3/Symfony/Component/Form/DataTransformerInterface.html, compare the documentation (*emphasis* mine) respectively for `transform` and for `reverseTransform`:

> Usually this will be *NULL*, but […] other empty values are possible as well (such as *empty strings*).
> Usually this will be *an empty string*, but […] other empty values are possible as well (such as *empty strings*).

This PR corrects the repetition in the latter, giving symmetry:

> Usually this will be *NULL*, but […] other empty values are possible as well (such as *empty strings*).
> Usually this will be *an empty string*, but […] other empty values are possible as well (such as *NULL*).

_Note:_ For now I just changed `empty strings` to `NULL`, which is 9 characters shorter, should I also reformat the affected comment paragraph so that this line and the subsequent ones fill up to 80 columns (as was the case before the change, and is for `transform`)?

Commits
-------

3f6e37e Fix copy-paste in PHPDoc comment text
2016-03-24 12:17:56 +01:00
Guilliam Xavier
3f6e37efe6 Fix copy-paste in PHPDoc comment text 2016-03-24 10:50:31 +01:00
Tobias Schultze
e375161784 minor #18284 [2.3] fix mocking of some methods (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] fix mocking of some methods

| Q             | A
| ------------- | ---
| Branch?       | 2.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? |no
| Tests pass?   | yes
| Fixed tickets | items 3, 4, 5, and 7 of https://github.com/sebastianbergmann/phpunit-mock-objects/issues/299#issuecomment-200443756
| License       | MIT
| Doc PR        |

Commits
-------

542cf6b [2.3] fix mocking of some methods
2016-03-24 00:07:02 +01:00
Christian Flothmann
542cf6b046 [2.3] fix mocking of some methods 2016-03-23 22:36:43 +01:00
Nicolas Grekas
a5965fb23b minor #18276 [ci] Tweak scripts (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ci] Tweak scripts

| Q             | A
| ------------- | ---
| Branch?       | 2.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/sebastianbergmann/phpunit-mock-objects/issues/299
| License       | MIT
| Doc PR        | -

Commits
-------

82c6bed [ci] Tweak scripts
2016-03-23 17:16:02 +01:00
Nicolas Grekas
82c6bed6b0 [ci] Tweak scripts 2016-03-23 17:07:44 +01:00
Nicolas Grekas
483da73079 minor #18270 [travis] Upgrade phpunit wrapper & hirak/prestissimo (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Upgrade phpunit wrapper & hirak/prestissimo

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

Must be merged after #18232

Commits
-------

bf465eb [travis] Upgrade phpunit wrapper & hirak/prestissimo
2016-03-23 13:37:48 +01:00
Nicolas Grekas
bf465eb6db [travis] Upgrade phpunit wrapper & hirak/prestissimo 2016-03-23 13:34:50 +01:00
Nicolas Grekas
e06574110a bug #18259 [PropertyAccess] Backport fixes from 2.7 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Backport fixes from 2.7

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

While merging 2.3 into 2.7, I noticed that many fixes were merged into 2.7 that should have been merged into 2.3. This PR backports them, with a few other fixes applied when merging 2.3 into 2.7.

Commits
-------

cb1c87a [PropertyAccess] Backport fixes from 2.7
2016-03-22 11:15:09 +01:00
Nicolas Grekas
cb1c87ac5f [PropertyAccess] Backport fixes from 2.7 2016-03-22 10:19:04 +01:00
Fabien Potencier
d01a10651b bug #18224 [PropertyAccess] Remove most ref mismatches to improve perf (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Remove most ref mismatches to improve perf

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

This PR is for PHP5 where ref mismatches is a perf pain: it removes all ref mismatches along the "getValue" path, and keeps only the required ones on the "setValue" path.

Commits
-------

72940d7 [PropertyAccess] Remove most ref mismatches to improve perf
2016-03-21 09:49:16 -07:00
Tobias Schultze
2710a88363 minor #18228 [Validator] use correct term for a property in docblock (not "option") (sustmi)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] use correct term for a property in docblock (not "option")

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

Commits
-------

e38d954 [Validator] use correct term for a property in docblock (not "option")
2016-03-19 06:04:37 +01:00
Miroslav Sustek
e38d954c59 [Validator] use correct term for a property in docblock (not "option") 2016-03-18 21:39:03 +01:00
Nicolas Grekas
72940d7588 [PropertyAccess] Remove most ref mismatches to improve perf 2016-03-18 15:37:16 +01:00
Fabien Potencier
06146f3f2b minor #18203 [FrameworkBundle][2.3] Add tests for the Controller class (dunglas)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle][2.3] Add tests for the Controller class

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

Backport tests of #18193 to the `abstract` Controller.

Commits
-------

ca56be1 [FrameworkBundle] Add tests for the Controller class
2016-03-18 07:13:28 +01:00
Fabien Potencier
11bb865238 bug #18210 [PropertyAccess] Throw an UnexpectedTypeException when the type do not match (dunglas, nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Throw an UnexpectedTypeException when the type do not match

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

Made in coordination with @dunglas,
Diff best viewed [ignoring whitspaces](https://github.com/symfony/symfony/pull/18210/files?w=1).

Quoting #18032:

> it appears that the current implementation is error prone because it throws a `\TypeError` that is an `Error` in PHP 7 but a regular `Exception` in PHP 5 because it uses the Symfony polyfill.
Programs wrote in PHP 5 and catching all exceptions will catch this "custom"  `\TypeError ` but not those wrote in PHP 7. It can be very hard to debug.

> In this alternative implementation:

> * catching type mismatch is considered a bug fix and applied to Symfony 2.3
> * for every PHP versions, a domain exception is thrown

Commits
-------

5fe2b06 [PropertyAccess] Reduce overhead of UnexpectedTypeException tracking
10c8d5e [PropertyAccess] Throw an UnexpectedTypeException when the type do not match
2016-03-18 07:09:03 +01:00
Fabien Potencier
a5d941479e minor #18212 [DomCrawler] Use XML_ELEMENT_NODE in nodeType check (rvanlaak)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Use XML_ELEMENT_NODE in nodeType check

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

Making use of the predefined dom constant `XML_ELEMENT_NODE` (which value is `1`) makes more sense while interpreting `parents()` it's functionality. See http://php.net/manual/en/dom.constants.php

Commits
-------

cffea91 Use XML_ELEMENT_NODE in nodeType check
2016-03-18 07:07:29 +01:00
Fabien Potencier
d1b84140b6 bug #18216 [Intl] Fix invalid numeric literal on PHP 7 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Fix invalid numeric literal on PHP 7

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

Work around `true === is_float(-9223372036854775808)`.

Commits
-------

999c0a5 [NumberFormatter] Fix invalid numeric literal on PHP 7
2016-03-18 07:04:14 +01:00
Nicolas Grekas
d2208301ee bug #18147 [Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols (natechicago)
This PR was squashed before being merged into the 2.3 branch (closes #18147).

Discussion
----------

[Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols

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

Commits
-------

c551bd1 [Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols
2016-03-17 15:26:27 +01:00
natechicago
c551bd17fc [Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols 2016-03-17 15:26:25 +01:00
Nicolas Grekas
999c0a5501 [NumberFormatter] Fix invalid numeric literal on PHP 7 2016-03-17 15:06:47 +01:00
Richard van Laak
cffea91c8e Use XML_ELEMENT_NODE in nodeType check 2016-03-17 10:11:54 +01:00
Nicolas Grekas
5fe2b06bc4 [PropertyAccess] Reduce overhead of UnexpectedTypeException tracking 2016-03-17 09:22:17 +01:00
Kévin Dunglas
10c8d5eadb [PropertyAccess] Throw an UnexpectedTypeException when the type do not match 2016-03-17 09:11:03 +01:00
Kévin Dunglas
ca56be1c8a [FrameworkBundle] Add tests for the Controller class 2016-03-16 19:32:37 +01:00
Nicolas Grekas
56624e6a9d minor #18195 Improved the PHPdoc of FileSystem::copy() (javiereguiluz)
This PR was squashed before being merged into the 2.3 branch (closes #18195).

Discussion
----------

Improved the PHPdoc of FileSystem::copy()

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

Commits
-------

9ad67ca Improved the PHPdoc of FileSystem::copy()
2016-03-16 16:52:39 +01:00
Javier Eguiluz
9ad67caea5 Improved the PHPdoc of FileSystem::copy() 2016-03-16 16:52:36 +01:00
Nicolas Grekas
092a42b22c minor #18196 [Validator] Test DNS Email constraints using checkdnsrr() mock (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Test DNS Email constraints using checkdnsrr() mock

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

Commits
-------

165755a [Validator] Test DNS Email constraints using checkdnsrr() mock
2016-03-16 16:51:17 +01:00
Nicolas Grekas
165755a01f [Validator] Test DNS Email constraints using checkdnsrr() mock 2016-03-16 16:47:01 +01:00
Fabien Potencier
54f4f88fa4 minor #18194 [travis] Run real php subprocesses on hhvm for Process component tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Run real php subprocesses on hhvm for Process component tests

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

Let's see if this speeds up hhvm test matrix line.

Commits
-------

c722e35 [travis] Run real php subprocesses on hhvm for Process component tests
2016-03-16 16:03:55 +01:00
Nicolas Grekas
c722e35fb3 [travis] Run real php subprocesses on hhvm for Process component tests 2016-03-16 14:40:51 +01:00