What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi, has anybody been working with strict transfers extensively? We are facing an issue when defining
Hi, has anybody been working with strict transfers extensively? We are facing an issue when defining a strict transfer, that contains another transfer.
Consider this example:
<transfer name="Foo" strict="true"> <property name="bar" type="Bar"> </transfer> <transfer name="Bar" strict="true"> </transfer>
It will create a transfer Foo
containing a property bar
, that can be of type Bar|null
. This is as expected.
However Foo::fromArray
will do Foo::assertInstanceOfTransfer
on property bar
, which will throw an exception, if bar
is null. This is not expected.
Does somebody know, whether there is a bug or we use this feature in a wrong way?
Thanks in advance.
Comments
-
Please always mention the version you are running the module with.
Is that latest module Transfer version?0 -
Itβs
3.29.2
0 -
That issue sounds familiar.
Let me check if we are close to releasing this fix.The $value !== null part is missing in the check
if ($value !== null && $this->isPropertyStrict($normalizedPropertyName)) { $this->assertInstanceOfTransfer($normalizedPropertyName, $value); }
per transfer.
I can let you know what I find out.
In the meantime you could adjust the template accordingly and continue.0 -
Thanks
0 -
May I close the support request if it's clarified then? Or not yet?
0 -
I will try to push this fix to be available before NYE.
I cannot say if we should close or keep open until then.0 -
I would like to keep the case open until a fix is available. Thanks for following up on this.
0 -
Good news, the fix has been released now as https://github.com/spryker/transfer/releases/tag/3.30.2
0 -
@UKMHZV8LX Did this fix your issues?
Can we then close this topic?0 -
Oh well, I did not notice, that a fix is in place as I did not receive a reply from the service desk.
0 -
I am sure it is coming, but I wanted to give you a heads up beforehand. Just to make sure we covered all points.
0 -
I will need some time to really run the implementation, but from looking at the code it looks fine.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random