This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes#18271).
Discussion
----------
[FileSystem] Google app engine filesystem
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/17922
| License | MIT
| Doc PR | -
Commits
-------
06d8697 [FileSystem] Add support for Google App Engine.
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
`ChoiceListFactoryInterface` expected `$group_by` to be a callable or
null not an array.
The factory defaults `group_by` to
`ChoiceListInterface::getStructuredValues`.
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
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
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
* 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