Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

v3.0.0 #25

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
44b43eb
[WIP] Begin v3.0.0
NicolasGuilloux May 20, 2020
d708f90
Fix circular services injection
NicolasGuilloux May 22, 2020
3475897
Improve normalizer
NicolasGuilloux May 29, 2020
1f3e37d
Merge branch 'master' into v3.0.0
Jun 17, 2020
10af235
Try to be minimalistic in updateCollection, add an optional argument …
Jun 29, 2020
7d59a1c
Fix bad EntityIdNormalizer context tag in dto normalizer
NicolasGuilloux Aug 27, 2020
e8d04be
Fix systematic entity id normalization on dto
NicolasGuilloux Aug 27, 2020
4fe13a3
Allow merging from new list to entity list in updateCollection
mdevlamynck Sep 7, 2020
02079db
Fix a small issue in the normalizer
NicolasGuilloux Nov 23, 2020
31746c7
Merge branch 'v3.0.0' of github.com:NicolasGuilloux/chaplean-dto-hand…
NicolasGuilloux Nov 23, 2020
4a04a7a
Merge branch 'master' into v3.0.0
mdevlamynck Jan 5, 2021
28cf00f
Fix a instanciation bug when no value is given
NicolasGuilloux Jan 27, 2021
529fe08
Merge branch 'v3.0.0' of github.com:NicolasGuilloux/chaplean-dto-hand…
NicolasGuilloux Jan 27, 2021
257fb0f
Fix array convertion
Apr 16, 2021
714a10c
Enlarge compatibility to Symfony 5, fix tests
NicolasGuilloux Jul 8, 2021
77c8889
Merge branch 'v3.0.0' of github.com:NicolasGuilloux/chaplean-dto-hand…
NicolasGuilloux Jul 8, 2021
cb6f0f8
Extends compatibility to Symfony 5 fuly with attributes
NicolasGuilloux Jul 8, 2021
ca486fb
Fix PHPUnit in CI
NicolasGuilloux Jul 8, 2021
3be8499
Fix translator interface class
NicolasGuilloux Jul 8, 2021
28a8f8f
Fix composer PHP dependency
NicolasGuilloux Jul 20, 2021
db30764
Add SubKey Annotation
Jan 31, 2022
3a6546c
Add SubKey Annotation
Jan 31, 2022
cb0b9b1
Add new validation groups key in context
Feb 4, 2022
594b473
Edit SubKey condition
Feb 7, 2022
f967f8f
Add AbstractClassResolverInterface
Apr 26, 2022
42b6cf2
Add OBJECT_TO_POPULATE option
Apr 29, 2022
ed73b47
Fix compiler pass
May 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add new validation groups key in context
Dumazeau committed Feb 4, 2022
commit cb0b9b1836ff724c8f3aed0416e8a13caeb992c6
4 changes: 3 additions & 1 deletion Serializer/DataTransferObjectDenormalizer.php
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
class DataTransferObjectDenormalizer implements DenormalizerInterface
{
public const VALIDATION_CONTEXT_KEY = '_dto_validation';
public const VALIDATION_GROUPS_CONTEXT_KEY = '_dto_validation_groups';

/**
* @var ParamConverterManager
@@ -56,7 +57,8 @@ public function denormalize($data, $type, $format = null, array $context = [])
$config->setIsOptional(false);
$config->setConverter('data_transfer_object_converter');
$config->setOptions([
'validate' => $context[self::VALIDATION_CONTEXT_KEY] ?? true
'validate' => $context[self::VALIDATION_CONTEXT_KEY] ?? true,
'groups' => $context[self::VALIDATION_GROUPS_CONTEXT_KEY] ?? [],
]);

$this->paramConverterManager->apply($request, $config);