Skip to content

Commit 7535bf4

Browse files
committed
Fixes for NotBlank using arrays
1 parent 8a01101 commit 7535bf4

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ jobs:
338338
phpunit-symfony-next:
339339
name: PHPUnit (Symfony NEXT ${{ matrix.symfony }}) (PHP ${{ matrix.php }})
340340
runs-on: ubuntu-latest
341+
continue-on-error: true
341342
strategy:
342343
matrix:
343344
php:
@@ -411,6 +412,7 @@ jobs:
411412
behat-symfony-next:
412413
name: Behat (Symfony NEXT ${{ matrix.symfony }}) (PHP ${{ matrix.php }})
413414
runs-on: ubuntu-latest
415+
continue-on-error: true
414416
strategy:
415417
matrix:
416418
php:

src/Serializer/Normalizer/MetadataNormalizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function normalize($object, $format = null, array $context = []): float|a
7070
$metadataContext['resource_class'] = $resourceMetadata::class;
7171

7272
$normalizedResourceMetadata = $this->normalizer->normalize($resourceMetadata, $format, $metadataContext);
73+
file_put_contents('/tmp/metadata_debug.txt', json_encode(['groups' => $metadataContext['groups'] ?? 'NOT_SET', 'normalized' => $normalizedResourceMetadata, 'persisted' => $resourceMetadata->getPersisted()], \JSON_PRETTY_PRINT));
7374
$data = $this->normalizer->normalize($object, $format, $context);
7475

7576
if (!\is_array($data)) {

tests/Functional/TestBundle/Form/ChildType.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
2727
[
2828
'constraints' => [
2929
new NotBlank(
30-
[
31-
'message' => 'Please provide your name',
32-
]
30+
message: 'Please provide your name'
3331
),
3432
],
3533
]

tests/Functional/TestBundle/Form/TestType.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
4242
[
4343
'constraints' => [
4444
new NotBlank(
45-
[
46-
'message' => 'Please provide your name',
47-
]
45+
message: 'Please provide your name'
4846
),
4947
],
5048
]
@@ -55,9 +53,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
5553
[
5654
'constraints' => [
5755
new NotBlank(
58-
[
59-
'message' => 'Please provide your company',
60-
]
56+
message: 'Please provide your company'
6157
),
6258
],
6359
]

0 commit comments

Comments
 (0)