atk4 / ui

Robust and easy to use PHP Framework for Web Apps
https://atk4-ui.readthedocs.io
MIT License
440 stars 105 forks source link

Prevent object to JSON encode in App #1993

Closed mvorisek closed 1 year ago

mvorisek commented 1 year ago

json_encode encodes public properties of an object only, encoding an object is often a mistake so better to catch it

in the future, if needed, we can support encode of objects implementing JsonSerializable interface, but as JsExpression does not implement such interface, it was never supported by atk4/ui, thus also I do not expect any BC break from this PR