Skip to content

Commit

Permalink
Merge branch '3.x' into feat/rector-rules-type-declarations-3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shakaran committed Mar 13, 2024
2 parents 96146b3 + e01be81 commit c261688
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 36 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
continue-on-error: ${{ matrix.can-fail }}

strategy:
Expand All @@ -28,17 +28,9 @@ jobs:
can-fail: false
- php-version: 7.4
composer-flags: ""
symfony-require: "4.4.*"
can-fail: false
- php-version: 7.4
composer-flags: ""
symfony-require: "5.3.*"
symfony-require: "5.4.*"
can-fail: false
coverage: yes
- php-version: 7.4
composer-flags: ""
can-fail: false
symfony-require: "5.4.*"
- php-version: 8.0
composer-flags: ""
can-fail: false
Expand All @@ -47,13 +39,21 @@ jobs:
composer-flags: ""
can-fail: false
symfony-require: "6.1.*"
- php-version: 8.1
- php-version: 8.2
composer-flags: ""
can-fail: false
symfony-require: "6.2.*"
- php-version: 8.2
composer-flags: ""
can-fail: false
symfony-require: "6.3.*"
- php-version: 8.2
composer-flags: ""
can-fail: true # we don't want to fail the build if we are incompatible with the next (unstable) Symfony version

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Install PHP with XDebug"
uses: "shivammathur/setup-php@v2"
Expand Down
1 change: 1 addition & 0 deletions Resources/doc/2-the-view-layer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ the important ones for configuring the view:
* ``setHeaders(array $headers)`` - Set multiple headers to put on the HTTP response.
* ``setStatusCode($code)`` - Set the HTTP status code.
* ``getContext()`` - The serialization context in use.
* ``setContext($context)`` - Set the serialization context.
* ``setFormat($format)`` - The format the response is supposed to be rendered in.
Can be autodetected using HTTP semantics.
* ``setLocation($location)`` - The location to redirect to with a response.
Expand Down
7 changes: 7 additions & 0 deletions Serializer/Normalizer/FlattenExceptionNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,11 @@ public function supportsNormalization($data, $format = null, array $context = []

return true;
}

public function getSupportedTypes(?string $format): array
{
return [
FlattenException::class => false,
];
}
}
7 changes: 7 additions & 0 deletions Serializer/Normalizer/FormErrorNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,11 @@ private function convertFormToArray(FormInterface $data): array

return $form;
}

public function getSupportedTypes(?string $format): array
{
return [
FormInterface::class => false,
];
}
}
2 changes: 2 additions & 0 deletions Tests/Controller/Annotations/AbstractParamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
class AbstractParamTest extends TestCase
{
private $param;

protected function setUp(): void
{
$this->param = $this->getMockForAbstractClass(AbstractParam::class);
Expand Down
2 changes: 2 additions & 0 deletions Tests/Controller/Annotations/AbstractScalarParamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
*/
class AbstractScalarParamTest extends TestCase
{
private $param;

protected function setUp(): void
{
$this->param = $this->getMockForAbstractClass(AbstractScalarParam::class);
Expand Down
2 changes: 2 additions & 0 deletions Tests/Controller/Annotations/FileParamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
*/
class FileParamTest extends TestCase
{
private $param;

protected function setUp(): void
{
$this->param = $this->getMockBuilder(FileParam::class)
Expand Down
2 changes: 2 additions & 0 deletions Tests/Controller/Annotations/QueryParamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
*/
class QueryParamTest extends TestCase
{
private $param;

protected function setUp(): void
{
$this->param = $this->getMockBuilder(QueryParam::class)
Expand Down
2 changes: 2 additions & 0 deletions Tests/Controller/Annotations/RequestParamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
*/
class RequestParamTest extends TestCase
{
private $param;

protected function setUp(): void
{
$this->param = $this->getMockBuilder(RequestParam::class)
Expand Down
7 changes: 7 additions & 0 deletions Tests/Functional/ParamFetcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace FOS\RestBundle\Tests\Functional;

use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

Expand All @@ -28,6 +29,12 @@ class ParamFetcherTest extends WebTestCase
'foobar' => 'foo',
];


/**
* @var KernelBrowser
*/
private $client;

private function createUploadedFile(string $path, string $originalName, $mimeType = null, $error = null, $test = false)
{
$ref = new \ReflectionClass(UploadedFile::class);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Request/RequestBodyParamConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
class RequestBodyParamConverterTest extends TestCase
{
protected $serializer;
protected $converterBuilder;
protected $converter;

protected function setUp(): void
{
Expand Down
43 changes: 21 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,38 @@
},
"require": {
"php": "^7.2|^8.0",
"symfony/config": "^4.4|^5.3|^6.0",
"symfony/dependency-injection": "^4.4|^5.3|^6.0",
"symfony/event-dispatcher": "^4.4|^5.3|^6.0",
"symfony/config": "^5.4|^6.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/event-dispatcher": "^5.4|^6.0",
"symfony/framework-bundle": "^4.4.1|^5.0|^6.0",
"symfony/http-foundation": "^4.4|^5.3|^6.0",
"symfony/http-kernel": "^4.4|^5.3|^6.0",
"symfony/routing": "^4.4|^5.3|^6.0",
"symfony/security-core": "^4.4|^5.3|^6.0",
"symfony/http-foundation": "^5.4|^6.0",
"symfony/http-kernel": "^5.4|^6.0",
"symfony/routing": "^5.4|^6.0",
"symfony/security-core": "^5.4|^6.0",
"willdurand/jsonp-callback-validator": "^1.0|^2.0",
"willdurand/negotiation": "^2.0|^3.0"
},
"require-dev": {
"doctrine/annotations": "^1.13.2",
"doctrine/annotations": "^1.13.2|^2.0 ",
"friendsofphp/php-cs-fixer": "^3.0",
"jms/serializer": "^1.13|^2.0|^3.0",
"jms/serializer-bundle": "^2.4.3|^3.0.1|^4.0|^5.0",
"psr/http-message": "^1.0",
"psr/log": "^1.0|^2.0|^3.0",
"sensio/framework-extra-bundle": "^6.1",
"symfony/phpunit-bridge": "^5.3|^6.0",
"symfony/asset": "^4.4|^5.3|^6.0",
"symfony/browser-kit": "^4.4|^5.3|^6.0",
"symfony/css-selector": "^4.4|^5.3|^6.0",
"symfony/expression-language": "^4.4|^5.3|^6.0",
"symfony/form": "^4.4|^5.3|^6.0",
"symfony/mime": "^4.4|^5.3|^6.0",
"symfony/security-bundle": "^4.4|^5.3|^6.0",
"symfony/serializer": "^4.4|^5.3|^6.0",
"symfony/twig-bundle": "^4.4|^5.3|^6.0",
"symfony/validator": "^4.4|^5.3|^6.0",
"symfony/web-profiler-bundle": "^4.4|^5.3|^6.0",
"symfony/yaml": "^4.4|^5.3|^6.0"
"symfony/phpunit-bridge": "^5.4|^6.0",
"symfony/asset": "^5.4|^6.0",
"symfony/browser-kit": "^5.4|^6.0",
"symfony/css-selector": "^5.4|^6.0",
"symfony/expression-language": "^5.4|^6.0",
"symfony/form": "^5.4|^6.0",
"symfony/mime": "^5.4|^6.0",
"symfony/security-bundle": "^5.4|^6.0",
"symfony/serializer": "^5.4|^6.0",
"symfony/twig-bundle": "^5.4|^6.0",
"symfony/validator": "^5.4|^6.0",
"symfony/web-profiler-bundle": "^5.4|^6.0",
"symfony/yaml": "^5.4|^6.0"
},
"suggest": {
"sensio/framework-extra-bundle": "Add support for the request body converter and the view response listener, requires ^3.0",
Expand All @@ -72,7 +72,6 @@
"conflict": {
"doctrine/annotations": "<1.12",
"sensio/framework-extra-bundle": "<6.1",
"symfony/error-handler": "<4.4.1",
"jms/serializer-bundle": "<2.4.3|3.0.0",
"jms/serializer": "<1.13.0"
},
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<phpunit bootstrap="vendor/autoload.php" colors="true">
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[indirect]=6"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[indirect]=8"/>
<ini name="error_reporting" value="-1" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>
Expand Down

0 comments on commit c261688

Please sign in to comment.