Skip to content

Commit 6e15dc7

Browse files
Debug
1 parent bee750e commit 6e15dc7

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ jobs:
425425
- name: Run Behat tests (PHP ${{ matrix.php }})
426426
run: |
427427
mkdir -p build/logs/behat
428-
vendor/bin/behat --out=std --format=progress --format=junit --out=build/logs/behat/junit --no-interaction ${{ matrix.coverage && '--profile=default-coverage' || '--profile=default' }}
428+
vendor/bin/behat -vvv --out=std --format=progress --format=junit --out=build/logs/behat/junit --no-interaction ${{ matrix.coverage && '--profile=default-coverage' || '--profile=default' }}
429429
- name: Merge code coverage reports
430430
if: matrix.coverage
431431
run: |
@@ -508,7 +508,7 @@ jobs:
508508
run: tests/Fixtures/app/console cache:clear --ansi
509509
- name: Run Behat tests
510510
run: |
511-
vendor/bin/behat --out=std --format=progress --profile=postgres --no-interaction -vv
511+
vendor/bin/behat -vvv --out=std --format=progress --profile=postgres --no-interaction
512512
513513
mysql:
514514
name: Behat (PHP ${{ matrix.php }}) (MySQL)
@@ -558,7 +558,7 @@ jobs:
558558
- name: Clear test app cache
559559
run: tests/Fixtures/app/console cache:clear --ansi
560560
- name: Run Behat tests
561-
run: vendor/bin/behat --out=std --format=progress --profile=default --no-interaction --tags '~@!mysql'
561+
run: vendor/bin/behat -vvv --out=std --format=progress --profile=default --no-interaction --tags '~@!mysql'
562562

563563
mongodb:
564564
name: PHPUnit + Behat (PHP ${{ matrix.php }}) (MongoDB)
@@ -616,7 +616,7 @@ jobs:
616616
- name: Run Behat tests
617617
run: |
618618
mkdir -p build/logs/behat
619-
vendor/bin/behat --out=std --format=progress --format=junit --out=build/logs/behat/junit --profile=mongodb-coverage --no-interaction
619+
vendor/bin/behat -vvv --out=std --format=progress --format=junit --out=build/logs/behat/junit --profile=mongodb-coverage --no-interaction
620620
- name: Merge code coverage reports
621621
run: |
622622
wget -qO /usr/local/bin/phpcov https://phar.phpunit.de/phpcov.phar
@@ -706,7 +706,7 @@ jobs:
706706
- name: Run Behat tests
707707
run: |
708708
mkdir -p build/logs/behat
709-
vendor/bin/behat --out=std --format=progress --format=junit --out=build/logs/behat/junit --profile=mercure-coverage --no-interaction
709+
vendor/bin/behat -vvv --out=std --format=progress --format=junit --out=build/logs/behat/junit --profile=mercure-coverage --no-interaction
710710
- name: Merge code coverage reports
711711
run: |
712712
wget -qO /usr/local/bin/phpcov https://phar.phpunit.de/phpcov.phar
@@ -788,7 +788,7 @@ jobs:
788788
- name: Clear test app cache
789789
run: tests/Fixtures/app/console cache:clear --ansi
790790
- name: Run Behat tests
791-
run: vendor/bin/behat --out=std --format=progress --profile=elasticsearch --no-interaction
791+
run: vendor/bin/behat -vvv --out=std --format=progress --profile=elasticsearch --no-interaction
792792

793793
elasticsearch-v8:
794794
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch v8)
@@ -841,7 +841,7 @@ jobs:
841841
- name: Clear test app cache
842842
run: tests/Fixtures/app/console cache:clear --ansi
843843
- name: Run Behat tests
844-
run: vendor/bin/behat --out=std --format=progress --profile=elasticsearch --no-interaction
844+
run: vendor/bin/behat -vvv --out=std --format=progress --profile=elasticsearch --no-interaction
845845

846846
elasticsearch-v7:
847847
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch v7)
@@ -894,7 +894,7 @@ jobs:
894894
- name: Clear test app cache
895895
run: tests/Fixtures/app/console cache:clear --ansi
896896
- name: Run Behat tests
897-
run: vendor/bin/behat --out=std --format=progress --profile=elasticsearch --no-interaction
897+
run: vendor/bin/behat -vvv --out=std --format=progress --profile=elasticsearch --no-interaction
898898

899899
phpunit-no-deprecations:
900900
name: PHPUnit (PHP ${{ matrix.php }}) (no deprecations)
@@ -1021,7 +1021,7 @@ jobs:
10211021
- name: Clear test app cache
10221022
run: tests/Fixtures/app/console cache:clear --ansi
10231023
- name: Run Behat tests
1024-
run: vendor/bin/behat --out=std --format=progress --profile=default --no-interaction
1024+
run: vendor/bin/behat -vvv --out=std --format=progress --profile=default --no-interaction
10251025

10261026
windows-behat:
10271027
name: Windows Behat (PHP ${{ matrix.php }}) (SQLite)
@@ -1074,7 +1074,7 @@ jobs:
10741074
run: tests/Fixtures/app/console cache:clear --ansi
10751075
- name: Run Behat tests
10761076
shell: bash
1077-
run: vendor/bin/behat --out=std --format=progress --profile=default --no-interaction
1077+
run: vendor/bin/behat -vvv --out=std --format=progress --profile=default --no-interaction
10781078

10791079
phpunit-symfony-lowest:
10801080
name: PHPUnit (PHP ${{ matrix.php }}) (Symfony lowest)
@@ -1162,7 +1162,7 @@ jobs:
11621162
- name: Clear test app cache
11631163
run: tests/Fixtures/app/console cache:clear --ansi
11641164
- name: Run Behat tests
1165-
run: vendor/bin/behat --out=std --format=progress --profile=default --no-interaction --tags='~@disableForSymfonyLowest'
1165+
run: vendor/bin/behat -vvv --out=std --format=progress --profile=default --no-interaction --tags='~@disableForSymfonyLowest'
11661166

11671167
phpunit_listeners:
11681168
name: PHPUnit event listeners (PHP ${{ matrix.php }})
@@ -1283,7 +1283,7 @@ jobs:
12831283
- name: Run Behat tests (PHP 8)
12841284
run: |
12851285
mkdir -p build/logs/behat
1286-
vendor/bin/behat --out=std --format=progress --format=junit --out=build/logs/behat/junit --profile=symfony_listeners --no-interaction
1286+
vendor/bin/behat -vvv --out=std --format=progress --format=junit --out=build/logs/behat/junit --profile=symfony_listeners --no-interaction
12871287
- name: Upload test artifacts
12881288
if: always()
12891289
uses: actions/upload-artifact@v4

tests/Fixtures/TestBundle/Serializer/Denormalizer/DummyPlainIdentifierDenormalizer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use ApiPlatform\Tests\Fixtures\TestBundle\Document\RelatedDummy as RelatedDummyDocument;
2121
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Dummy as DummyEntity;
2222
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\RelatedDummy as RelatedDummyEntity;
23+
use Doctrine\Common\Collections\ArrayCollection;
2324
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
2425
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
2526
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -50,12 +51,13 @@ public function denormalize($data, $class, $format = null, array $context = []):
5051
]] + $context);
5152
}
5253

53-
if (!empty($data['relatedDummies'])) {
54+
if (isset($data['relatedDummies'])) {
5455
foreach ($data['relatedDummies'] as $k => $v) {
5556
$data['relatedDummies'][$k] = $this->iriConverter->getIriFromResource($relatedDummyClass, UrlGeneratorInterface::ABS_PATH, new Get(), ['uri_variables' => [
5657
'id' => $v,
5758
]] + $context);
5859
}
60+
$data['relatedDummies'] = new ArrayCollection($data['relatedDummies']);
5961
}
6062

6163
return $this->denormalizer->denormalize($data, $class, $format, $context + [self::class => true]);

0 commit comments

Comments
 (0)