- Issue created by @geek-merlin
- e0ipso Can Picafort
I know where this is. This is fixed in version 2 of CL Components, which is SDC → . This is the one I am trying to push for core inclusion.
Long story short the problem is mainly around schema validation. Unsurprisingly JSON schema is limited to ... JSON types. It does not support PHP types. We had to support a superset of JSON-Schema.
https://git.drupalcode.org/project/drupal/-/merge_requests/3432/diffs#eb...
- Status changed to Closed: won't fix
almost 2 years ago 4:37pm 14 February 2023 - e0ipso Can Picafort
In other words, sadly marking this as won't fix. I think the upgrade to SDC won't be super impactful, so there is that.
In case you are willing to port it back to CL Components, please reopen the issue. Most of the code in SDC should be compatible.
- 🇩🇪Germany geek-merlin Freiburg, Germany
Thanks for the quick response! I totally agree that this is the best decision, to give SDC priority.
Nice to know this is fixed there, and i'll move over as soon as it's reasonably stable.
For now i'm using an other workaround: Wrap my object in an array. Not clean, but worksforme. - Status changed to Active
almost 2 years ago 4:28pm 16 February 2023 - 🇩🇪Germany geek-merlin Freiburg, Germany
After the array wrapping did not work out, i went the extra mile and ported to SDC.
Had to mainly change the directory and the render array type.> I know where this is. This is fixed in version 2 of CL Components, which is SDC.
Sadly i can not confirm that. - 🇩🇪Germany geek-merlin Freiburg, Germany
I know that the Drupal folks have a traditional love for arrays ;-), also in the theming realm.
But we use a different style, that does a lot in object methods (mainly getters and wrapper getters), which brings us down to no preprocessing magic in most cases.
As additional context why simply converting to arrays is not a viable option for us (in fact this is how i started the project, but it was doom). - e0ipso Can Picafort
This is the syntax to use objects as props: https://git.drupalcode.org/project/sdc/-/blob/1.x/tests/modules/sdc_test...
- Status changed to Fixed
over 1 year ago 1:52pm 7 March 2023 - 🇩🇪Germany geek-merlin Freiburg, Germany
Yo, by removing that strange json serialization of context, that commit fixed this too. Yay!
Automatically closed - issue fixed for 2 weeks with no activity.