Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114430 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 98958 invoked from network); 12 May 2021 09:21:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 May 2021 09:21:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2338A1804B5 for ; Wed, 12 May 2021 02:29:22 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (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 ; Wed, 12 May 2021 02:29:21 -0700 (PDT) Received: by mail-ot1-f51.google.com with SMTP id i23-20020a9d68d70000b02902dc19ed4c15so16019322oto.0 for ; Wed, 12 May 2021 02:29:21 -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=OKiZK3QeS7p/hcx7mGRkEfdIqDlmNjp8bFDI6UxKsbA=; b=Hf0DPre3LuJ3ifk/yIkENaJbYuj+SeX/sFDAa2VOo+PHfgKdvNNKAOwYp/Ju4ISsXy 4ErqyqumOJlufCuva3q7na9/hm3MVM193ZBWA9Sa18JMeGj7xkpkjtF+8D3oo33a0L3f UnFpPYHgjHI7NWiv5eQyIHO3Y/6bEg4m1pyFm6pBN1MDExCEYx2wNZZfYdt5D0CBixhJ R3dOnLzlLJevZBVdqJN9/PB6Qy7BSr39BPO0ewXbWp7PgVS/EPksqFElspzLb9odZRhH oSyBiWf2FFFI1oaSuRXDUlaN79jaC8/Rr7X2y54fvLb06F5iY6bLGI4bl+gWYLPDANSN n5kw== 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=OKiZK3QeS7p/hcx7mGRkEfdIqDlmNjp8bFDI6UxKsbA=; b=ukqr1QVpQ4ogBOZcaZDQytDYR/6Vlayq6ZnTlcyFqdYmQPUo7mnUjZPAULc4IXSNgI pScdITp3bS/o6dSl82Z94CVFXpZ8yNvPl5GB3pbtLraqL1tZED1tx5rqhdgFS+xamiQC 0UnJoaaLWNSK8p6hEKozsh/qg7geY1j0ZXxOy30hYJWFAm6pjqespSuqT05RTuolNWDq XiaGxA63xEqMHVIv7MRv3luunsN21b+E3RMm4BZGfB+g0xzl1UWlhbRmXlMYYcxruqEI 7lBp2Pm77E0Avnh3qedhtX0uXRg7AtDSQXViUZCeigMEzDHuvXquwNBsY2PLta9McWRX CU/A== X-Gm-Message-State: AOAM530JPEH7bLPlhKYjpklRzpeyYeECr8XD2jcCZ+jC+kWfSClGnIfi HbX3Tz6iOLMHSfJG8kmf1+42wc/p84lf6Inr/pk= X-Google-Smtp-Source: ABdhPJxhPSnw8035snCIqctlyjdHj0t9kMRlDHLOKP5hEbHPBGmzOqfIsGt+NaQlbFsvz46+fMW55zJbscgBhHOgQ2k= X-Received: by 2002:a05:6830:10c7:: with SMTP id z7mr400531oto.278.1620811755546; Wed, 12 May 2021 02:29:15 -0700 (PDT) MIME-Version: 1.0 References: <3B7C1AC0-9CC0-4B88-A610-64AB6A364B36@9dev.de> In-Reply-To: Date: Wed, 12 May 2021 11:29:04 +0200 Message-ID: To: Nikita Popov Cc: Moritz Friedrich , PHP internals Content-Type: multipart/alternative; boundary="000000000000efec4305c21ea4fa" Subject: Re: [PHP-DEV] Disable interactive mode (-a) if readline not available From: krakjoe@gmail.com (Joe Watkins) --000000000000efec4305c21ea4fa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Morning Nikita, +1 on the change to cli. It can't really be a default extension right now because readline license is not compatible: https://github.com/php/php-src/pull/3823 Even without the license problem, I'm not convinced of the value of adding the dependency: Because of this long standing strange behaviour, I don't really think the interactive shell is well used. Cheers Joe On Wed, 12 May 2021 at 10:48, Nikita Popov wrote: > On Wed, May 12, 2021 at 10:37 AM Moritz Friedrich wrote: > > > > > > Am 12.05.2021 um 10:12 schrieb Nikita Popov : > > > > > > Hi internals, > > > > > > If the readline extension is enabled, PHP provides an interactive she= ll > > > under -a. If it is not enabled, it falls back to an "interactive mode= " > > > (yes, the difference between "interactive shell" and "interactive mod= e" > > is > > > important here). The interactive mode is simply an stdin input, which > > needs > > > to be terminated using Ctrl+D. You can only run one script that way. > > > > > > I think the current behavior is quite confusing, because it's really > not > > > obvious that you ended up in this fallback mode (you need to know the > > > difference between "shell" and "mode" in the output) and most people > > > wouldn't know what to do with it. The latest instance of this is > > > https://bugs.php.net/bug.php?id=3D81033. > > > > > > I think we would be better off disabling -a completely if readline is > not > > > available, and exit with a helpful error message. I've opened > > > https://github.com/php/php-src/pull/6976 to that effect. Does that > sound > > > reasonable? > > > > > > Regards, > > > Nikita > > > > Hi Nikita, > > if I may ask, would it also be possible to have deadline as a mandatory > > dependency to always have the interactive shell available? Is there a > good > > reason to compile PHP without? Having a basic prompt available is reall= y > > handy at times =E2=80=94 especially looking at Node.js with their > ahead-completion > > and general UX. > > The same has been done for other PHP modules in the past, so I wonder i= f > > we could simply have readline as a guarantee. > > > The readline extension has an external dependency on readline / libedit. > Making it a required extension would also make this a required dependency= . > We avoid having dependencies for the minimal build. The only dependency w= e > currently have is libpcre, and we vendor that one. I doubt we'll want to > add a new vendored dependency, as they tend to be a major pain. > > I personally do not use the interactive shell (and I think most people wh= o > do use *an* interactive shell prefer psysh), so I don't think this can be > reasonably considered a "required" feature. > > Regards, > Nikita > --000000000000efec4305c21ea4fa--