Commit Graph

25760 Commits

Author SHA1 Message Date
Fabien Potencier
932211d071 Merge branch '2.3' into 2.7
* 2.3:
  [Request] Fix support of custom mime types with parameters
2016-03-25 18:55:03 +01:00
Fabien Potencier
fa01e848d0 bug #18310 [Guard] fix minimum required Seucirty Http version (xabbuh)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Guard] fix minimum required Seucirty Http version

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

Otherwise, the `TargetPathTrait` is not available.

Commits
-------

952bf01 [Guard] fix minimum required Seucirty Http version
2016-03-25 18:53:12 +01:00
Fabien Potencier
db869e2841 minor #18307 [2.7] fix mocks (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] fix mocks

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

* check for existance of `setMetadataFactory()` method (this is needed
  for tests run with deps=high as the method was removed in Symfony
  3.0)
* fix mock testing the `EngineInterface` as the `stream()` method cannot
  be mocked when it is does not exist in the mocked interface

Commits
-------

d9be1b4 fix mocks
2016-03-25 18:34:49 +01:00
Fabien Potencier
f9b0aaa488 bug #18289 [FrameworkBundle] Return the invokable service if its name is the class name (dunglas)
This PR was squashed before being merged into the 3.1-dev branch (closes #18289).

Discussion
----------

[FrameworkBundle] Return the invokable service if its name is the class name

| 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 a service is invokable and has the same name than its class name, the controller resolver of FrameworkBundle doesn't retrieve the service and tries to construct a new instance of the class instead.

This is a very rare edge case, but this fix is useful for dunglas/DunglasActionBundle#36: referencing auto-registered controllers following the ADR style in YAML and XML routing files will be more intuitive.

Currently: `defaults:  { _controller: 'Your\Action\FQN:__invoke' }`, after this fix: `defaults:  { _controller: 'Your\Action\FQN' }`.

This PR also fix a currently useless test.

Commits
-------

70b9309 [FrameworkBundle] Return the invokable service if its name is the class name
2016-03-25 18:28:09 +01:00
Kévin Dunglas
70b9309b79 [FrameworkBundle] Return the invokable service if its name is the class name 2016-03-25 18:28:04 +01:00
Fabien Potencier
3c75c48838 feature #18242 [FrameworkBundle][TwigBundle] Make EngineInterface autowirable (dunglas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle][TwigBundle] Make EngineInterface autowirable

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

Commits
-------

26ed582 [FrameworkBundle][TwigBundle] Make EngineInterface autowirable
2016-03-25 17:49:43 +01: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
Christian Flothmann
d9be1b4cc4 fix mocks
* check for existance of `setMetadataFactory()` method (this is needed
  for tests run with deps=high as the method was removed in Symfony
  3.0)
* fix mock testing the `EngineInterface` as the `stream()` method cannot
  be mocked when it is does not exist in the mocked interface
2016-03-25 16:52:47 +01:00
Nicolas Grekas
c1ca48765e Merge branch '2.3' into 2.7
* 2.3:
  fix mocks

Conflicts:
	src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php
2016-03-25 16:39:22 +01:00
Christian Flothmann
952bf010f2 [Guard] fix minimum required Seucirty Http version 2016-03-25 13:06:35 +01:00
Fabien Potencier
697bac9bf2 feature #18197 Make Request::isFromTrustedProxy() public. (Peter Bex)
This PR was merged into the 3.1-dev branch.

Discussion
----------

Make Request::isFromTrustedProxy() public.

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

When adding custom headers to your proxy (in our particular case, a `X-Base-Url` header, but it could be anything), it is necessary to be able to tell whether the request came from a trusted proxy or not. Unfortunately, currently the `isFromTrustedProxy()` method is private, which means you'll need to subclass `Request` and add your own *differently named* method just to be able to access this information.

This functionality is pretty straightforward, and I don't see a reason to keep this method private so this a trivial pull request to make it public (and it adds a comment so it'll show up in the API docs with proper documentation).

Commits
-------

286f64f Make Request::isFromTrustedProxy() public.
2016-03-25 12:38:37 +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
3598105da9 Merge branch '3.0' 2016-03-25 02:52:00 +01:00
Tobias Schultze
8529f190fb [Form] remove irrelevant doc after 3.0 merge 2016-03-25 02:50:54 +01:00
Tobias Schultze
fe36f04889 Merge branch '2.8' into 3.0 2016-03-25 02:41:20 +01:00
Tobias Schultze
a8843132b8 Merge branch '2.7' into 2.8 2016-03-25 02:40:30 +01:00
Tobias Schultze
0cd725ea42 Merge branch '2.3' into 2.7 2016-03-25 02:39:14 +01:00
Tobias Schultze
43df701103 minor #18303 [Form] Fix Forms docblock to use FQCN (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fix `Forms` docblock to use FQCN

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

Commits
-------

df61aab [Form] Fix `Forms` docblock to use FQCN
2016-03-25 02:32:07 +01:00
Tobias Schultze
0839df5b70 minor #18302 [Form] Fix FormBuilderInterface docblocks (HeahDude)
This PR was merged into the 3.0 branch.

Discussion
----------

[Form] Fix `FormBuilderInterface` docblocks

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

Commits
-------

67458d8 [Form] Fix `FormBuilderInterface` docblocks
2016-03-25 02:26:45 +01:00
Tobias Schultze
90ece1cf5c minor #18299 [Form] Remove unused legacy code in ChoiceType (HeahDude)
This PR was merged into the 3.0 branch.

Discussion
----------

[Form] Remove unused legacy code in `ChoiceType`

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

Commits
-------

8af78e9 [Form] Remove unused legacy code in `ChoiceType`
2016-03-25 02:25:21 +01:00
Jules Pietri
df61aabaa7 [Form] Fix Forms docblock to use FQCN 2016-03-24 20:57:49 +01:00
Jules Pietri
67458d8cf5 [Form] Fix FormBuilderInterface docblocks 2016-03-24 20:40:46 +01:00
Jules Pietri
8af78e9f9b [Form] Remove unused legacy code in ChoiceType 2016-03-24 20:00:16 +01:00
Christian Flothmann
2066fc03c7 [Validator] do not treat payload as callback 2016-03-24 16:03:49 +01:00
Tobias Schultze
058dee70c6 minor #18293 [FrameworkBundle 2.7+] Removed unused variables (iltar)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle 2.7+] Removed unused variables

| Q             | A
| ------------- | ---
| Branch?       | 2.7, can be merged upwards
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

I noticed some unused variables in the Framework Extension. I did a project inspection in phpstorm and I found nothing else. Hence I submit this PR to make it consistent again.

Commits
-------

9fea1ee Removed unused variables
2016-03-24 14:05:39 +01:00
Iltar van der Berg
9fea1ee4f4 Removed unused variables 2016-03-24 12:33:34 +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
Tobias Schultze
d31d92ef67 minor #18286 [2.7] fix mocking of some methods (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] fix mocking of some methods

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

Commits
-------

a45b93d [2.7] fix mocking of some methods
2016-03-24 11:22:08 +01:00
Guilliam Xavier
3f6e37efe6 Fix copy-paste in PHPDoc comment text 2016-03-24 10:50:31 +01:00
Christian Flothmann
a45b93d423 [2.7] fix mocking of some methods 2016-03-24 10:06:43 +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
Tobias Schultze
06b1e5d38b minor #18287 [3.0] fix mocking of some methods (xabbuh)
This PR was merged into the 3.0 branch.

Discussion
----------

[3.0] fix mocking of some methods

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

Commits
-------

07308e9 [3.0] fix mocking of some methods
2016-03-23 23:48:01 +01:00
Christian Flothmann
07308e9322 [3.0] fix mocking of some methods 2016-03-23 23:25:51 +01:00
Christian Flothmann
542cf6b046 [2.3] fix mocking of some methods 2016-03-23 22:36:43 +01:00
Christian Flothmann
243e59c108 Merge branch '3.0'
* 3.0:
  fix controller tests
  move test methods to test case class
2016-03-23 21:25:59 +01:00
Christian Flothmann
abbc7e3f86 minor #18282 fix controller tests (xabbuh)
This PR was merged into the 3.0 branch.

Discussion
----------

fix controller tests

| Q             | A
| ------------- | ---
| Branch?       | 3.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | items 9 to 12 from https://github.com/sebastianbergmann/phpunit-mock-objects/issues/299#issuecomment-200443756
| License       | MIT
| Doc PR        |

Add missing public method stubs to `TestController` (all methods in the base `Controller` class from the FrameworkBundle are `protected` since Symfony 3.0).

Commits
-------

fb963d2 fix controller tests
2016-03-23 21:21:31 +01:00
Christian Flothmann
fb963d27c9 fix controller tests
Add missing public method stubs to `TestController` (all methods in the
base `Controller` class from the FrameworkBundle are `protected` since
Symfony 3.0).
2016-03-23 21:13:13 +01:00
Christian Flothmann
239d546db3 Merge branch '2.8' into 3.0
* 2.8:
  move test methods to test case class
2016-03-23 21:03:51 +01:00
Christian Flothmann
d2b0ebc941 Merge branch '2.7' into 2.8
* 2.7:
  move test methods to test case class
2016-03-23 20:59:19 +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
Nicolas Grekas
abb8d6486a bug #18248 Fast multiple setEx with the pipeline transcation (RedisAdapter::doSave) (masterklavi)
This PR was squashed before being merged into the 3.1-dev branch (closes #18248).

Discussion
----------

Fast multiple setEx with the pipeline transcation (RedisAdapter::doSave)

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

Commits
-------

e132763 Fast multiple setEx with the pipeline transcation (RedisAdapter::doSave)
2016-03-23 18:34:09 +01:00
Masterklavi
e132763f55 Fast multiple setEx with the pipeline transcation (RedisAdapter::doSave) 2016-03-23 18:33:57 +01:00
Nicolas Grekas
c7493f5649 minor #18278 use class constants instead of FQCN strings (xabbuh)
This PR was merged into the 3.1-dev branch.

Discussion
----------

use class constants instead of FQCN strings

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

Commits
-------

d4ec7dd use class constants instead of FQCN strings
2016-03-23 18:29:10 +01:00
Nicolas Grekas
9e32a4d2c3 Merge branch '3.0'
* 3.0:
  [ci] Tweak scripts

Conflicts:
	appveyor.yml
2016-03-23 18:20:53 +01:00
Christian Flothmann
d4ec7dd845 use class constants instead of FQCN strings 2016-03-23 18:13:33 +01:00
Nicolas Grekas
96eacb4884 Merge branch '2.8' into 3.0
* 2.8:
  [ci] Tweak scripts
2016-03-23 18:06:38 +01:00