Closed (fixed)
Project:
Custom Elements
Version:
3.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2025 at 20:41 UTC
Updated:
12 Dec 2025 at 21:29 UTC
Jump to comment: Most recent
With #3555044: JSON output does not differentiate between props and slots the default JSON output changed, that leaked through to toArray(). While it makes a lot of sense for the JSON normalization to be explicit about props and slots, that's not necessarily desired when calling toArray. Let's add a new $explicit = FALSE flag which controls whether the output will be explicit about the output structure.
Stay with $explicit FALSE by default. The normalizer should not make NOT-explicit output deprecated. That way the API for toArray() does not change.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
fagoComment #4
fagoimplemented. also added a new ::toJson() helper that works now like toArray() before and respects the json-setting.
Comment #6
fago