Skip to content

Commit

Permalink
Merge pull request #2392 from smoench/drop-symfony-versions
Browse files Browse the repository at this point in the history
fixes several issues to make the CI pass again
  • Loading branch information
goetas authored Sep 26, 2023
2 parents 3b97786 + a4ad08b commit 3530bf0
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 37 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,7 +39,15 @@ 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: false

Expand Down
2 changes: 1 addition & 1 deletion FOSRestBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FOSRestBundle extends Bundle
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new SerializerConfigurationPass());
$container->addCompilerPass(new ConfigurationCheckPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -10);
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
2 changes: 1 addition & 1 deletion Tests/Functional/DependencyInjectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function registerBundles(): array
];
}

public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function (ContainerBuilder $container) {
$container->loadFromExtension('framework', [
Expand Down
6 changes: 6 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,11 @@ class ParamFetcherTest extends WebTestCase
'foobar' => 'foo',
];

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

private function createUploadedFile($path, $originalName, $mimeType = null, $error = null, $test = false)
{
$ref = new \ReflectionClass(UploadedFile::class);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function getLogDir(): string
return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/logs';
}

public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load($this->rootConfig);
$loader->load(function (ContainerBuilder $container) {
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 3530bf0

Please sign in to comment.