Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109939 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19041 invoked from network); 30 Apr 2020 01:47:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Apr 2020 01:47:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1074E1804D0 for ; Wed, 29 Apr 2020 17:20:59 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8075 40.64.0.0/10 X-Spam-Virus: No X-Envelope-From: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-oln040092010021.outbound.protection.outlook.com [40.92.10.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 29 Apr 2020 17:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SonABHKZhdWu9t1AN4LrgRphj8XOJmbtRP3b7fePDJt2Opv3HK3et7P09Zjr0owIm/D5e7py1CGy9dddU1GRXZe8IlMA7YkYUtBU3Cn7W6UhA361KRloivkFjA5qj5Ef4KY2XNFuT8ZAa2W7bBvzxf4t36qwOZjM1QIDd5BPNPvlA4GoRtnCzAvTJd2cX7wat/AHgjdrxpODbZT0Bm2D/Ta7ZOSBg3UwvI0K8T5Nwl5zvDlXCAekMeeZO31+nWbpPB4p5E5lf+rzcNm5V8/08v8XdniUXlFAxxSXy6GeIuz6pq4ESgwvy8nzO7a9irIBIP2WBnJkMWWzdunj6cmI0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ooKQxiMmHiG2f0+MxbQK7mSOsvrkou84JvwIYy8gaKg=; b=XqsmaXVDY9WeUS96KO4U/wUAYJUuE9+oU4+e35LtO8t4Fr+zplAwO1a8mcRckGM7155Ar7gwbimfjZbHrJhSU6zjb1COMwIlPDUzWMa4LnFptr7qiBOZgY+xqO5Cz9FzCV/63oMLetHW5v16inCxNfuXx7Fu3myp32kPsWjFwEzzhspRVsZPRc4YzSHyaxjUfKEJujNOT5mczRiYZFviPpUIPigi8zFlpi5gZUNZD+NjCDiinG6FbWTIHmozK8socKRfBkPUcUv8dZGeDrc81t3mid/xB3QYruBVUHBibDdV16hBjQmACLTPNw3vONiNxKqfc+Z9k7TITl95NOG4vQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ooKQxiMmHiG2f0+MxbQK7mSOsvrkou84JvwIYy8gaKg=; b=G8NY0qkJVyHBjTxcW82pHslkDczAM4Frx8BVhU9SSCE7strUvcoHU2gXqTNIEtvP+3g/0C+tL5ytyb0xW4JGzJLEGSFnAFH9WfH5ubgoN0wZS6K8ltUpUjx9OZDOSWCJvUAnVUznrreEXSVQlpRRlXyX1NciQnFYaYZVivCEhen8lOQm82NFj6nmT7jmKNgiowYD2bndxHozBjYu+FZBWQyPgW4IS6fTPVYUZnHf/9m2p3tCjiYPQLKlSB0J3aefHp+YAb0etVwPVTO+JMMzokOy8Ou2f4dIwnHExU1tWWn+AFK/tekAtPdIJSyedgr0XCcd8vBM6YgsBuZekreyag== Received: from CO1NAM04FT046.eop-NAM04.prod.protection.outlook.com (10.152.90.59) by CO1NAM04HT215.eop-NAM04.prod.protection.outlook.com (10.152.91.2) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.15; Thu, 30 Apr 2020 00:20:56 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:7e4d::41) by CO1NAM04FT046.mail.protection.outlook.com (2a01:111:e400:7e4d::373) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.15 via Frontend Transport; Thu, 30 Apr 2020 00:20:56 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::e553:b74f:bf64:30c5]) by DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::e553:b74f:bf64:30c5%4]) with mapi id 15.20.2937.023; Thu, 30 Apr 2020 00:20:56 +0000 To: "internals@lists.php.net" Thread-Topic: [RFC] Always available JSON extension Thread-Index: AQHWHoMfwYl/VPysCU+BThJopcVmdQ== Date: Thu, 30 Apr 2020 00:20:56 +0000 Message-ID: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:85EECB5D03DDCB0BC4044822F55CEDDE6B04274EA2227483AF966CEA2E37EFD3;UpperCasedChecksum:1CC578460AB852EFCCC06BCD2BE4B6CE88B19BA1AA58CAF3115B4C15A94BDD67;SizeAsReceived:6697;Count:42 x-tmn: [CXS7wsOLqHpD0bY3zpqsAP3BHAfBs3Rz] x-ms-publictraffictype: Email x-incomingheadercount: 42 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 057caa30-a01e-448d-6013-08d7ec9c5a07 x-ms-traffictypediagnostic: CO1NAM04HT215: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ffhrX1DkPUVllj0GNdZ8w5AftNhGZwM6vD2wsdZl0Oy6ZqytkJcVdlu+10lfGH3XpLtWod4hzVBZLlDBomMcwR7qKRqS6i5DRPuvYWnYIqFNIJbmIXAPOJMdXTY6Gavbv1AW2Ut5YX8H0R6tEcNnkSj6q5Rz9tl37jbXpZZMsaWeMLopU7sqS6G53oVY13lkujxvS1n64NQc6omL+te0Wo+dNRA+kn7w112Dq+MjbyXPpjJ6SKXsIA1dfvbY+C5H x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR07MB6618.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; x-ms-exchange-antispam-messagedata: g91MZKLdX+JmFfDJntMGcqYz0OG9CfX+pnBqOaRt9J9ouh76F9BAn4g+LsSQbK6c+ns0LNueGR7AjSROngFykNkanmVaHVp5wp+n1IA99Qeu/iilcPFtM0kFT36ElSARXmRFSX9GrYKAnnmhCbcZBA== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 057caa30-a01e-448d-6013-08d7ec9c5a07 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2020 00:20:56.5200 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM04HT215 Subject: [RFC] Always available JSON extension From: tysonandre775@hotmail.com (tyson andre) Hi internals,=0A= =0A= I've created https://wiki.php.net/rfc/always_enable_json with an implementa= tion at https://github.com/php/php-src/pull/5495=0A= =0A= The proposal is to make it impossible to disable the JSON extension through= configuration or build options,=0A= and require that JSON be built statically instead of as a shared library=0A= (to avoid linker errors or extension=3Djson being commented out).=0A= =0A= > Currently, it's possible to disable the json extension with `./configure = =96disable-json`.=0A= > However, JSON is extremely useful to have because it's widely used for ma= ny use cases=0A= > (web sites, logging output, and as a data format that can be used to shar= e data with =0A= > many applications and programming languages),=0A= > so it would be useful for PHP maintainers and users to guarantee that jso= n is always enabled.=0A= =0A= Responses to earlier questions in my earlier thread "Moving json extension = to core?" in https://externals.io/message/109783=0A= =0A= > In terms of getting it passed, I'd focus on just the first part, making= =0A= > JSON a "core" builtin. Let the printf modifier be a separate RFC, or at= =0A= > least a separate question.=0A= =0A= Agreed - limiting this to making JSON a "core" builtin (similar to "hash" i= n 7.4) was my intent.=0A= The printf comment was to measure interest in a potential followup RFC that= would depend on this=0A= (and give an example of internal functionality this would allow.).=0A= =0A= > At the risk of derailing... You can have your class implement the=0A= > interface unconditionally, then have a polyfill definition in your autolo= ad=0A= > for cases where it doesn't exist. Obviously, it won't have an impact on= =0A= > calls to json_encode(), but if the interface doesn't exist it's because= =0A= > json_encode() doesn't either, so that should be harmless. :D=0A= =0A= That would work for userland, but might cause problems if multiple PECL mod= ules were to take that approach,=0A= because they'd define duplicate classes. =0A= =0A= Thanks,=0A= - Tyson=0A=