Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112241 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72263 invoked from network); 12 Nov 2020 19:05:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Nov 2020 19:05:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2E5051804D8 for ; Thu, 12 Nov 2020 10:28:02 -0800 (PST) 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.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 12 Nov 2020 10:28:01 -0800 (PST) Received: by mail-lj1-f169.google.com with SMTP id y16so7365561ljh.0 for ; Thu, 12 Nov 2020 10:28:01 -0800 (PST) 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=tWrVPzi5Pn4EuYoyB38dT2kqmJm1OrcN6Q7B/+sR8iA=; b=MMKWJz72sf3ispsDTluA1b1x3GRfu1BLWdXiKjKAPUC32AgBLIcdp8m1wi5j7RMZwF HD7PffrLqRJ60gI7tOUpegubgyBJ3nOmpT+F1ws0kvJ6UocjRVgvgntbTiL3qO112IHE QglOgdVBui248HJcNSFdjhtioZUmHcVBWfa/efdAjaSr8fn2qkUaxzQSIk9jCx8Yt48W Yl/chFF1kVmddFrFXu/ZZ2uD3z4OLLLixULz7X9mfNrT7VcNYwk8z1xhg2IX+9v3zrTP aEHVg4ldWTQ8d3LO5M+NYRprHzxrKiCBsKX1/jYTuutaV+kQadPCkr+J+41sRW7eCQXM mOlA== X-Gm-Message-State: AOAM532/XAIAntK0BLNE0UigRzgOtDqxzq3pDckYaNNO9OLMpzCVfaw1 DpC/BurNCKs6kqpSPnNE/zydiGUeYX11rSXmGxFd+GMYgjei0Q== X-Google-Smtp-Source: ABdhPJwfv4VEO4CV9sH/RrzKPXX6YjzA8DbJcEZmbLZMukc9ZjBsTSRiKxII6v0xR+2cL6ItOlJmTZ80AdJvjgfXaRI= X-Received: by 2002:a2e:2c14:: with SMTP id s20mr379059ljs.398.1605205680145; Thu, 12 Nov 2020 10:28:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 12 Nov 2020 12:27:49 -0600 Message-ID: To: Pierre Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="0000000000005b644705b3ed12e4" Subject: Re: [PHP-DEV] Why there is no StreamWrapper interface ? From: pollita@php.net (Sara Golemon) --0000000000005b644705b3ed12e4 Content-Type: text/plain; charset="UTF-8" On Thu, Nov 12, 2020 at 7:00 AM Pierre wrote: > This might be a stupid question, or it may have already been answered > tons of times, but is there any valid reason for not having a > StreamWrapper interface as documented there: > https://www.php.net/manual/en/class.streamwrapper.php > > Or if some methods are optional, multiple interfaces, or if all methods > are optional, an abstract base class in PHP standard library ? > > Many methods are optional, but more generically it's that user-space wrappers date to PHP 4.3 and like... did we ever HAVE interfaces at that point? Or abstract classes? It was a different time, man. You were there, you know what it was like... Honestly, I kind of regard the state of PHP's filesystem libraries to be one big hot mess. I'd really much rather redesign them from the ground up with some BC shims to avoid breaking the world, but I lack the drive to make that happen at the moment. -Sara --0000000000005b644705b3ed12e4--