Hey all. On 05.07.22 02:04, Peter Cowburn wrote:
On Mon, 4 Jul 2022 at 11:11, Jakub Zelenka <bu...@php.net> wrote:On Mon, Jul 4, 2022 at 8:38 AM Timon de Groot <tdegroo...@gmail.com> wrote:Hi internals, If the rest also thinks the RFC is good to go, I suggest we start a vote coming week. As this is my first RFC, I'm not so sure how this typically gets kicked off, so I'd like to know what I need to do!You just need to change status in RFC to Voting and in voting section set the date range and add doodle poll - you can basically copy it from one of the open RFC's (see for example code in https://wiki.php.net/rfc/fetch_property_in_const_expressions ). Then you just need to send email to internals with subject prefixed with [RFC][VOTE] or similar. As noted you need to do it today or latest tomorrow. Feel free to let me know if you are too busy or something is not clear. I would recommend not to do any last time changes as in such case you should probably give an extra time for dicusion which means it won't make the feature freeze and will have to wait for another year. In my opinion it is good as it is. The tabs can be later added as an extra flag. If the flag is set, we could just change default value for indent to 1 and use tabs but it would be still possible for users to set indent size if they wish. I think that's something that makes most sense to me and doesn't impact the current RFC in any way. Regards JakubMy thoughts might be firmly in the realms of "too little, too late" since the vote is open already, so by all means choose to ignore.
I'll be on the same lines!What I would have prefered is instead of a the new parameter $indent having a numerical value to have a string value.
That would have allowed the following: json_encode($data, indent: " "); or json_encode($data, indent: "\t");That would have made the tabs vs. spaces very easy and people can also add whatever they want to set for one indentation. Think about setting dots for making the spaces visible for some formatted output or whatever else people might think of.
And setting the "indent" parameter would always implicitly set the flag "JSON_PRETTY_PRINT" (as it doesn't make sense to not have that set).
The current way of just being able to set a number of spaces to indent or to use a flag for tabs is a bit fiddly at best and does make adding accessibility a second class citizen. Therefore I will vote against this current implementation.
Cheers Andreas -- ,,, (o o) +---------------------------------------------------------ooO-(_)-Ooo-+ | Andreas Heigl | | mailto:andr...@heigl.org N 50°22'59.5" E 08°23'58" | | https://andreas.heigl.org | +---------------------------------------------------------------------+ | https://hei.gl/appointmentwithandreas | +---------------------------------------------------------------------+
OpenPGP_0xA8D5437ECE724FE5.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature