Commit Graph

23396 Commits

Author SHA1 Message Date
Christian Flothmann 542cf6b046 [2.3] fix mocking of some methods 2016-03-23 22:36:43 +01:00
Nicolas Grekas bd6d9bb1c2 minor #18283 [FrameworkBundle] move test methods to test case class (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] move test methods to test case class

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

Commits
-------

8188653 move test methods to test case class
2016-03-23 20:29:17 +01:00
Christian Flothmann 81886530c7 move test methods to test case class 2016-03-23 19:17:25 +01:00
Tobias Schultze 1ef2edf4b4 [Routing] add query param if value is different from default 2016-03-23 18:41:29 +01:00
Nicolas Grekas 505bf4db5d Merge branch '2.3' into 2.7
* 2.3:
  [ci] Tweak scripts
2016-03-23 17:16:30 +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 2b3f4261d6 Fix backport 2016-03-23 13:43:53 +01:00
Nicolas Grekas c5dbb1d9b6 Merge branch '2.3' into 2.7
* 2.3:
  [travis] Upgrade phpunit wrapper & hirak/prestissimo
2016-03-23 13:40:00 +01:00
Nicolas Grekas ec84aafa28 bug #18272 [Bridge\PhpUnit] Workaround old phpunit bug, no colors in weak mode, add tests (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Bridge\PhpUnit] Workaround old phpunit bug, no colors in weak mode, add tests

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

Commits
-------

4ea9548 [Bridge\PhpUnit] Workaround old phpunit bug, no colors in weak mode, add tests
2016-03-23 13:39:43 +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 4ea9548e23 [Bridge\PhpUnit] Workaround old phpunit bug, no colors in weak mode, add tests 2016-03-23 13:16:35 +01:00
Arjen van der Meijden b3da6a11a7 [Routing] Don't needlessly execute strtr's as they are fairly expensive 2016-03-22 21:13:27 +01:00
Nicolas Grekas f4c18db19a Merge branch '2.3' into 2.7
* 2.3:
  [PropertyAccess] Backport fixes from 2.7

Conflicts:
	src/Symfony/Component/PropertyAccess/PropertyAccessor.php
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
2016-03-22 11:18:53 +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 241a72504b bug #18261 [PropertyAccess] Fix isPropertyWritable not using the reflection cache (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[PropertyAccess] Fix isPropertyWritable not using the reflection cache

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

While merging 2.3 into 2.7, I noticed that isPropertyWritable did not make use of the reflection cache of getWriteAccessInfo. This PR fixes it.

Commits
-------

8a52fcd [PropertyAccess] Fix isPropertyWritable not using the reflection cache
2016-03-22 10:58:08 +01:00
Nicolas Grekas 8a52fcdbff [PropertyAccess] Fix isPropertyWritable not using the reflection cache 2016-03-22 10:40:06 +01:00
Nicolas Grekas cb1c87ac5f [PropertyAccess] Backport fixes from 2.7 2016-03-22 10:19:04 +01:00
Nicolas Grekas 86c0a17721 Merge branch '2.3' into 2.7
* 2.3:
  [Validator] use correct term for a property in docblock (not "option")
  [PropertyAccess] Remove most ref mismatches to improve perf
  [Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols
  [NumberFormatter] Fix invalid numeric literal on PHP 7
  Use XML_ELEMENT_NODE in nodeType check
  [PropertyAccess] Reduce overhead of UnexpectedTypeException tracking
  [PropertyAccess] Throw an UnexpectedTypeException when the type do not match
  [FrameworkBundle] Add tests for the Controller class

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php
	src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
	src/Symfony/Component/PropertyAccess/PropertyAccessor.php
	src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php
	src/Symfony/Component/PropertyAccess/PropertyPath.php
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
	src/Symfony/Component/Validator/Constraints/EmailValidator.php
2016-03-22 09:55:46 +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
Fabien Potencier 46e82299e2 minor #18227 [Routing] small refactoring for scheme requirement (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] small refactoring for scheme requirement

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

Commits
-------

85f5e01 [Routing] small refactoring for scheme requirement
2016-03-21 06:55:59 -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
Tobias Schultze 85f5e0138d [Routing] small refactoring for scheme requirement 2016-03-18 19:55:39 +01:00
Nicolas Grekas 72940d7588 [PropertyAccess] Remove most ref mismatches to improve perf 2016-03-18 15:37:16 +01:00
Fabien Potencier 66f54ff6b8 minor #18204 [FrameworkBundle][2.7] Add tests for the Controller class (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

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

| 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

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

Commits
-------

514a060 [FrameworkBundle] Add tests for the Controller class
2016-03-18 07:14:51 +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
Christophe Coevoet cb2b1dcf3b minor #18217 [Process] fix docblock syntax (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] fix docblock syntax

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

Commits
-------

f909fca [Process] fix docblock syntax
2016-03-17 12:46:57 +01:00
Christian Flothmann f909fcad67 [Process] fix docblock syntax 2016-03-17 12:37:14 +01:00
Richard van Laak cffea91c8e Use XML_ELEMENT_NODE in nodeType check 2016-03-17 10:11:54 +01:00
Nicolas Grekas 8cd9138938 bug #18023 [Process] getIncrementalOutput should work without calling getOutput (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] getIncrementalOutput should work without calling getOutput

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

Commits
-------

37d8695 [Process] getIncrementalOutput should work without calling getOutput
2016-03-17 09:31:46 +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 514a06083a [FrameworkBundle] Add tests for the Controller class 2016-03-16 19:49:12 +01:00
Kévin Dunglas ca56be1c8a [FrameworkBundle] Add tests for the Controller class 2016-03-16 19:32:37 +01:00
Romain Neutron 37d86956f2 [Process] getIncrementalOutput should work without calling getOutput 2016-03-16 18:33:24 +01:00
Nicolas Grekas bcb1b2d0f0 minor #18199 [Validator] Test DNS Url constraints using checkdnsrr() mock (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

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

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

a4b42d1 [Validator] Test DNS Url constraints using checkdnsrr() mock
2016-03-16 17:13:39 +01:00
Nicolas Grekas a4b42d1fbd [Validator] Test DNS Url constraints using checkdnsrr() mock 2016-03-16 17:01:33 +01:00
Nicolas Grekas c7686a3624 Merge branch '2.3' into 2.7
* 2.3:
  Improved the PHPdoc of FileSystem::copy()
  [Validator] Test DNS Email constraints using checkdnsrr() mock
  [travis] Run real php subprocesses on hhvm for Process component tests
  bug #18161 [Translation] Add support for fuzzy tags in PoFileLoader
  [Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
  [Form] Fix INT64 cast to float in IntegerType.
  [SecurityBundle][PHPDoc] Added method doumentation for SecurityFactoryInterface
  FrameworkBundle: Client: getContainer(): fixed phpdoc
  [Validator] Updating inaccurate docblock comment

Conflicts:
	.travis.yml
	src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
2016-03-16 17:00:15 +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