Skip to content

Commit d9aecb3

Browse files
Kocaldmaicher
andauthored
Allow Symfony 6 (#408)
* Allow Symfony 6 * fix: fix Symfony 6 support * chore: remove Symfony 3.4 support (unmaintened) * chore: remove useless comment * fix: adjust serializers types * fix: adjust serializer types for Symfony 4.4 * Update Serializer/Denormalizer/RouteCollectionDenormalizer.php Co-authored-by: David Maicher <[email protected]> * Update RouteCollectionDenormalizer.php Co-authored-by: David Maicher <[email protected]>
1 parent ed97d4c commit d9aecb3

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

.github/workflows/code_checks.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ jobs:
4343
symfony: '*'
4444

4545
# Test each supported Symfony version with lowest supported PHP version
46-
- php: '7.1'
47-
dependencies: highest
48-
symfony: '3.4.*'
49-
5046
- php: '7.1'
5147
dependencies: highest
5248
symfony: '4.4.*'
@@ -62,6 +58,10 @@ jobs:
6258
- php: '7.4'
6359
dependencies: highest
6460
symfony: '5.4.*'
61+
62+
- php: '8.0'
63+
dependencies: highest
64+
symfony: '6.0.*'
6565
steps:
6666
- name: Checkout
6767
uses: actions/checkout@v2
@@ -94,4 +94,4 @@ jobs:
9494
- name: Run PHPUnit tests
9595
env:
9696
SYMFONY_DEPRECATIONS_HELPER: max[self]=0
97-
run: vendor/bin/simple-phpunit -v
97+
run: vendor/bin/simple-phpunit -v

Command/RouterDebugExposedCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ protected function configure()
7373
;
7474
}
7575

76-
/**
77-
* @see Command
78-
*/
7976
protected function execute(InputInterface $input, OutputInterface $output): int
8077
{
8178
if ($name = $input->getArgument('name')) {

Serializer/Denormalizer/RouteCollectionDenormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class RouteCollectionDenormalizer implements DenormalizerInterface
2121
* {@inheritDoc}
2222
* @return mixed
2323
*/
24-
public function denormalize($data, $class, $format = null, array $context = array())
24+
public function denormalize($data, $type, $format = null, array $context = [])
2525
{
2626
$collection = new RouteCollection();
2727

@@ -49,7 +49,7 @@ public function supportsDenormalization($data, $type, $format = null): bool
4949
if (!is_array($data)) {
5050
return false;
5151
}
52-
52+
5353
if (count($data) < 1) {
5454
return true;
5555
}

Serializer/Normalizer/RoutesResponseNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class RoutesResponseNormalizer implements NormalizerInterface
2121
{
2222
/**
23-
* {@inheritdoc}
23+
* {@inheritDoc}
2424
* @return array|string|int|float|bool|\ArrayObject|null
2525
*/
2626
public function normalize($data, $format = null, array $context = array())

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
],
1818
"require": {
1919
"php": "^7.1|^8.0",
20-
"symfony/framework-bundle": "~3.4|^4.4.20|^5.0",
21-
"symfony/serializer": "~3.4|^4.4.20|^5.0",
22-
"symfony/console": "~3.4|^4.4.20|^5.0",
20+
"symfony/framework-bundle": "^4.4.20|^5.3|^6.0",
21+
"symfony/serializer": "^4.4.20|^5.3|^6.0.1",
22+
"symfony/console": "^4.4.20|^5.3|^6.0",
2323
"willdurand/jsonp-callback-validator": "~1.1"
2424
},
2525
"require-dev": {
26-
"symfony/expression-language": "~3.4|^4.4.20|^5.0",
27-
"symfony/phpunit-bridge": "^5.3"
26+
"symfony/expression-language": "^4.4.20|^5.3|^6.0",
27+
"symfony/phpunit-bridge": "^5.3|^6.0"
2828
},
2929
"autoload": {
3030
"psr-4": { "FOS\\JsRoutingBundle\\": "" },

0 commit comments

Comments
 (0)