Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105838 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 62613 invoked from network); 4 Jun 2019 21:55:01 -0000 Received: from unknown (HELO mail-oi1-f179.google.com) (209.85.167.179) by pb1.pair.com with SMTP; 4 Jun 2019 21:55:01 -0000 Received: by mail-oi1-f179.google.com with SMTP id t76so1384281oih.4 for ; Tue, 04 Jun 2019 12:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4+DlU0oKiKnUqwzAdiy6T5cr+O6jfQmKrvpdzbWlqXw=; b=fsXRTeOlFyZ0mCpK+HBD3Yk7HMI2bDYaIVy1Gp/GxLNwpbFPqURK73buPxa+p2dZjM q0v9I86thKWtF0bKKWcqgLt+O7kisN2ak+3FgKwN4HO3xAJdLjhw/VBPpedm/phN5/7D kNyuWgfB+MKDw5hvwZ1d5BnqrI75YWF202DGYq2+fIe1dOzox3rjH2OUXCjM6tqQumc3 Mjnbe1DnKqtlOsJ/pCR6yejCRmNB/ku2Fhz/bt4/IRDIG3nO9onAa7WVhGA1qFqcGFyH twqoC52zLAVo4B6Px7d8oIAHOcplmCPJLUML4JU1nY6fncdWdUjohzpsz6KaeVQaDYu8 oVOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4+DlU0oKiKnUqwzAdiy6T5cr+O6jfQmKrvpdzbWlqXw=; b=jzLVSbv13RASlidj+KE8AUi33xHJYzM6wb1rQs6RgrTXq5BllqwD0CewQCedOYSuJ/ 2Deo97UzuykjXgvJkEuFcrz7yGy1sJdI1oNYj+F3jD/oxypjQnVIRxdEI8XsS3xVKVrS lFdWC5T1BDkHSxgpfc7LAM6JSxlMW0cdifbu+c1zIeduyheuLY7e76JiIQxw4oXIlGHY YGOsgTQ2pdIaebXRKiOPDRWAjdqYgq0Ub14AgO3msx13Z2cLNI7yYbzBPIamUEmzbpE5 dYFpF/F6ShzNaD5lS0woub+ZNzQQJ7EfBIl6bsYXrjztZET1Tg+7mYdUjZopggpK9058 ffxA== X-Gm-Message-State: APjAAAUd+stjvT01sMqAU6nNg5JykvpKX/p/DPNlXGaAUDXLKOSY38+G vjxfWlIrQEU0j1Jhrs639Nh6J0DBqDN/7sZH9Ylg8T6fnj8= X-Google-Smtp-Source: APXvYqzkz9VpUdTiBLc2Hf2eetsjw9MtLt90Dd+5a7HRN7HP5qxADr0R7gnIg9qiKlIRQpXCy23ZlighDOWLGxhlNYA= X-Received: by 2002:aca:3047:: with SMTP id w68mr5253995oiw.71.1559675158929; Tue, 04 Jun 2019 12:05:58 -0700 (PDT) MIME-Version: 1.0 References: <5ce73302.1c69fb81.f3278.4af8SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <5ce73302.1c69fb81.f3278.4af8SMTPIN_ADDED_MISSING@mx.google.com> Date: Tue, 4 Jun 2019 21:05:47 +0200 Message-ID: To: Andrea Faulds Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000d025ec058a842b89" Subject: Re: [PHP-DEV] Re: JSON_THROW_ON_ERROR implementation detail From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000d025ec058a842b89 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Le ven. 24 mai 2019 =C3=A0 01:55, Andrea Faulds a =C3=A9crit : > > Please see the discussion on the original pull request: > https://github.com/php/php-src/pull/2662 > > The existing behaviour is deliberate, was already discussed, and was > Symfony is affected too, could you please have a look at the following PR? https://github.com/symfony/symfony/pull/31860/files Is the added boilerplate correct? Is this behavior planned to change / be fixed in the short term? Global side effects are nightmare, that cannot be "by design". Thanks for considering. Hugs, Nicolas > part of the RFC that was accepted. So there is a high standard to meet > for going back on that. > > The idea was to keep the two error handling approaches cleanly > separated. This would mean that we could eventually change the default > behaviour and deprecate the old error mechanism, if we wanted to. > > If you explicitly request the modern exception-based error-handling > mechanism and catch the exception, which contains the error code and > message, you have no good reason to then try to retrieve the same error > code and message via the legacy functions. What's the advantage of > mixing and matching interfaces like this? It doesn't feel like good > coding practice. > > Sorry for the slow response. I haven't checked the internals list that > frequently lately. > > Andrea > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --000000000000d025ec058a842b89--