Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101769 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60015 invoked from network); 5 Feb 2018 12:52:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2018 12:52:09 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.43 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.43 mail-wm0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:37974] helo=mail-wm0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/9B-49805-873587A5 for ; Mon, 05 Feb 2018 07:52:08 -0500 Received: by mail-wm0-f43.google.com with SMTP id 141so25583040wme.3 for ; Mon, 05 Feb 2018 04:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=HZeFoOqLmWUC9WsT4EM47faHbffn4qiKlmB9ws888QM=; b=LntLQD0QrZypo390qZSKdFwdY/AVS2UNOh/yCRgS9hkMqkhEK9j0eeD4JXQ3tzTxT/ OQvpmIscllgLr739RpmP8Wull9/rmvvv61xYGp1t6omZ+r1XzR+Whz5KBJT/Lt1phlEU lofqB0ARIKzyO/u2XZZFLLzQ9y60nnqyLpvtsUAZEGUI2D1p4sI8W9dS94C+x2Vi4YH5 teydywaJ00JZNz2uL+xycZ/zsQ6nqA17fW33mwIF2DMAqdpkILcIOp/oHVtLqpE89o5Y L27iW659I/Z0iQ7AEV+bX7kqaOmdWWIdJFPp+I3sTE8RehF5Q0PBqexC3Z49OoU+e7Os NeYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=HZeFoOqLmWUC9WsT4EM47faHbffn4qiKlmB9ws888QM=; b=geidwf8fSiCj5k6X/CCgUO+rRXeCriRN9DEYCp013ps0OsFSAyY7afrHbqsVf6xC7o yGJhYls0L2EugmtLgwjfAbipSZTodMyEWmaUNJuzapfBnDinEmrKIpj0ByXeeZzzaUdS Jcl/hckWjhFo2563dJm+5+Mc549rzKp5GiEmYcHMyMyYztgQhsfzeN4yrhaZyFjOs2Qc ZrwmDqopShFlmNaD1OCKBVsqPgpZ/9zV+TH6VcM1K2yLmi3OeXAcc12rqNfOb9UYfLp7 iN5JEfrYYn6KsrmxakP/A/y4F/9falTQgo1yBZFN44Ff1MU//RhkdW3zkBCIejMGqVWI /j/g== X-Gm-Message-State: AKwxytdBGWdoJjuFoYBsN/t038DS5zfXgIu4fACx6AmPbHi07+Lgvhz/ 7lF3LbTZtBYwoSS1nf2MrxfXm9MwBJXMtUBPEJc5HQ== X-Google-Smtp-Source: AH8x225vEXcU0ru3tjis5hSUFVH6DvP6O3YKVi3Qm4+wC4fVDjNQ6VBLMuID0MUSxr3Pb8gqNbO/fc6ppEroDapEqZU= X-Received: by 10.80.206.23 with SMTP id y23mr80298146edi.137.1517835125259; Mon, 05 Feb 2018 04:52:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.222.195 with HTTP; Mon, 5 Feb 2018 04:52:04 -0800 (PST) In-Reply-To: References: <59e48427-ce88-58fb-f802-48b7412e480d@hoa-project.net> Date: Mon, 5 Feb 2018 12:52:04 +0000 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary="94eb2c1af74a7801500564768781" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope From: rowan.collins@gmail.com (Rowan Collins) --94eb2c1af74a7801500564768781 Content-Type: text/plain; charset="UTF-8" On 5 February 2018 at 10:53, Marco Pivetta wrote: > > See https://externals.io/message/101745#101752 > > The problem is always with routines (not functions)) that rely on shared > global mutable state. > > Mocking those is generally a problem, as it exposes a dependency inversion > issue, rather than actually getting rid of an implicit reliance on global > state that is not declared to consumers of a SUT. > While that would be a perfectly fine justification for not adding this feature, it doesn't address the impact of removing the feature now that it has existed for over 8 years. Even before the feature is actually removed, anyone using such tests would be faced with the following options: * Put up with hundreds of notices until they have a chance to completely refactor the code in question. * Suppress all messages of a particular level (possibly E_STRICT initially and E_DEPRECATED later) until they have the chance to refactor. * Prepend \ to global function references, purely to stop the deprecation notices, and break all tests that relied on this mocking mechanism. None of these options is particularly appealing, and this will all be for a hypothetical future improvement to the language. Regards, -- Rowan Collins [IMSoP] --94eb2c1af74a7801500564768781--