Skip to content

Conversation

@MrMeshok
Copy link
Contributor

@MrMeshok MrMeshok commented Jun 4, 2025

Fix #269
I found out that this bug was introduced in #230, to be more precise this lines ArrayTransformerFactory.
Before #230 $targetCollections would be equal [] so we would get return new DictionaryTransformer(new CopyTransformer());. And CopyTransformer would just pass enums from property to setPaymentMethods().
But simply removing this lines wouldn't work because they do serve they purpose in fixing weird behavior in #230.

So I dug further and found out original issue.
Here WriteMutator should get that setPaymentMethods() expects PaymentMethod[] but gets blocked here GetTypeTrait because argument $property equals 'setPaymentMethods' and we get this check that result in false and we skip trying to extract types

'$paymentMethods' !== '$setPaymentMethods'

@joelwurtz
Copy link
Member

Nice catch, thanks you

@joelwurtz joelwurtz merged commit 69f7789 into jolicode:main Jun 20, 2025
6 checks passed
@MrMeshok MrMeshok deleted the fix/269 branch June 20, 2025 10:31
@MrMeshok MrMeshok restored the fix/269 branch June 23, 2025 12:55
@p-pichet
Copy link

Hi. @joelwurtz is it planned to release this fix ?

@joelwurtz
Copy link
Member

yes but don't know when , i have other things that i want to fix / do before a new release, there will certainly be a release this summer

@p-pichet
Copy link

p-pichet commented Sep 8, 2025

@joelwurtz any news ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enums mapping is not working correctly

3 participants