* 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
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.
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
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
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
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
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
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
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
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
Add missing public method stubs to `TestController` (all methods in the
base `Controller` class from the FrameworkBundle are `protected` since
Symfony 3.0).
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
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)
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
This PR was squashed before being merged into the 3.1-dev branch (closes#18211).
Discussion
----------
[Security] Use auth trust resolver to determine anonymous in ContextListener
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | not done yet
There is a nice class in Symfony that is used to check whether a token is anonymously: `AuthenticationTrustResolver`. However, its logic was still hard coded in the `ContextListener`, making it impossible to customize it (e.g. using another anonymous token class). I think it makes lots of sense to use the dedicated class.
Commits
-------
ab5578e [Security] Use auth trust resolver to determine anonymous in ContextListener
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Bridge\PhpUnit] Add "disabled" mode to SYMFONY_DEPRECATIONS_HELPER
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18222
| License | MIT
| Doc PR | -
See https://github.com/symfony/symfony/pull/18232/files?w=1
Because we keep adding features to the bridge, so that one could want some features but not the deprecations helper.
In weak mode, this PR also disables colors.
Fetching the SYMFONY_DEPRECATIONS_HELPER env var is also done lazily to workaround old phpunit versions affected by sebastianbergmann/phpunit#1216
Commits
-------
64fe539 [Bridge\PhpUnit] Add "disabled" mode to SYMFONY_DEPRECATIONS_HELPER