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..
How do people deal, in general, with inconsistent data in Yves?
Comments
-
@UKGT7RC7P letβs take PDP as an example. if the price is a mandatory filed for showing a PDP, in
ProductStorageClient
, you can introduce the validation check and throw 404 exception, you donβt need to check all template/pages0 -
sure -- but overriding the storage client isn't a very nice thing to do
0 -
and there is no built-in way of ensuring consistent data
0 -
whatever your buseiness rules might be
0 -
in the end you just have an unstructured array from storage (or NULL)
0 -
StorageClient
must return transfer-object not array0 -
\Spryker\Client\ProductStorage\Finder\AbstractProductViewTransferFinder::findProductViewTransfer()
0 -
my mistake, but that in turn has no validation rules π
0 -
/** * @param int $idProduct * @param string $localeName * @param array $selectedAttributes * * @return \Generated\Shared\Transfer\ProductViewTransfer|null */ public function findProductViewTransfer(int $idProduct, string $localeName, array $selectedAttributes = []): ?ProductViewTransfer
0 -
a product view transfer doesn't mean a valid product view transfer as everything is nullable (which is a general problem with TOs in Spryker - none of them can be guaranteed to be valid at any given point in time but they are used in a way where they are expected to be valid)
0 -
and problems happen in the expanders
0 -
if expander fails with null or missing index in array, this is a bug and we need to fix it
0 -
(I think I was thinking of the Search / Catalog data when I mentioned the raw arrays)
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 77 Spryker News
- 938 Developer Corner
- 795 Spryker Development
- 90 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
- 27 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
- 33 Product & Business Questions
- 69 Spryker Safari Questions
- 50 Random