Closed eliashaeussler closed 10 months ago
It breaks simpler flow as well. We have a custom mapper that unmarshal UUIDs.
$mapper = $this->builder
->infer(UuidInterface::class, fn() => Uuid::class)
->registerConstructor(
Uuid::fromString(...)
)
->mapper();
Works with proper UUID mapping before 1.8.0, and gives an error after 1.8.0 update:
The type
UuidInterface
for return type of methodRamsey\Uuid\Uuid::fromString()
could not be resolved: Cannot parse unknown symbolUuidInterface
.
Rolling back to 1.7.0 fixes the issue.
This change leads to the BC break:
https://github.com/CuyZ/Valinor/commit/a462fe1539a6553af26583fc99f09dfb33b49959
I have no clue what was fixed with the commit as there seems to be no corresponding issues which needed to be resolved in the first place (at least I am unable to see that from the commit history which did not introduce a test-case for the fixed issue).
I guess we are conflicting with valinor >= 1.8.0 for now until we now how @romm figured out a solution which does not break new stuff implemented in 1.8.0.
Hi there, my apologies for quite a big regression! 😬
FYI commit a462fe1539a6553af26583fc99f09dfb33b49959 was introduced because of https://github.com/CuyZ/Valinor/issues/394#issuecomment-1746722996 — unfortunately tests would not cover the usecase you described in this issue.
All these cases should be fixed with #463, but before I merge it and release it would you mind checking this branch out (or apply the patch) in your applications and see if everything is fine?
Thanks!
Hi @romm, thanks for taking care of the issue! I can confirm that the fix works on my end, tests are green again. :tada:
Alright let's go for it, thanks!
Thanks, @romm! ❤️
Hi there, my apologies for quite a big regression! 😬
Happens to the best. Thanks for the immediate fix.
@romm Not sure if this is related but I do now get the following exception:
CuyZ\Valinor\Definition\Repository\Cache\Compiler\Exception\TypeCannotBeCompiled
with
The type
CuyZ\Valinor\Type\Types\CallableType
cannot be compiled.
That issue did not appear in 1.8.0 (maybe due to all tests failing regarding the issue fixed here) and did not appear in 1.7.0 either. I will try to dive deeper into this and provide a dedicated issue for that problem.
Hi @boesing, definitely not the same issue. I'll take a look right now, could you open a separate issue for the tracking?
Thanks for the report!
Done in #465. Could you give it a try?
Hi,
since v1.8.0 I get an exception due to an unrecognized namespace. This seems to be related to #457, because without this change everything works as expected.
Background: I'm trying to map an API response to a domain model which has a named constructor. The constructor has an array type annotated which contains another nested domain model:
Here's a workflow run that failed due to the change: https://github.com/CPS-IT/personio-jobs/actions/runs/7351388708/job/20014655808?pr=131
When running locally, I get another error:
Debugging showed me the following in
Mapper/Tree/Shell.php
:When changing the type
array{jobDescription: list<JobDescription>}
to use a FQCNarray{jobDescription: list<\CPSIT\Typo3PersonioJobs\Domain\Model\JobDescription>}
, everything works as expected.