Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114427 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 91515 invoked from network); 12 May 2021 08:29:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 May 2021 08:29:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4E3031804CC for ; Wed, 12 May 2021 01:37:06 -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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail.hades.9dev.de (mail.hades.9dev.de [88.99.187.36]) (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 01:37:05 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D52945E070; Wed, 12 May 2021 10:37:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9dev.de; s=dkim; t=1620808623; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=gvW1J+CoIJfeoTP01M9kCCN17xladhILRuo2ckdzGQ8=; b=H4wCs/uSR6w6VzbzqlMj3l/sssu9kBZ+fz5zNPs+1Yw3xdmdp1FqZpy7fXEtrzA3zHQxxN rG5U3mMIcbrI8vbE37HKad9Yo5ngfhGw/DACseDBNcS4UIBt64nubHzIXclHRDN2Y8NbRM tA5X/Qdrf5/pTRHQLdOlzDN9SkY1lkikzkS1Wbista4HFDfsWOUQrWQ25qVMRz/Jf1h5V7 rgXKTq/dQIPxMiob0FC+Zu1AY0LsgtTr1cRcJtKw5AxnKnT4A/jCnc0pp1KUFDUi6Rug8F WUbZEc0hLR0/ZeNRINyeyywv2qsZ0lZE85XM9jZ4yWqTSJkOtQnMTHYTpRgg5w== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) In-Reply-To: Date: Wed, 12 May 2021 10:36:57 +0200 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <3B7C1AC0-9CC0-4B88-A610-64AB6A364B36@9dev.de> References: To: Nikita Popov X-Last-TLS-Session-Version: TLSv1.2 Subject: Re: [PHP-DEV] Disable interactive mode (-a) if readline not available From: m@9dev.de (Moritz Friedrich) > Am 12.05.2021 um 10:12 schrieb Nikita Popov : >=20 > Hi internals, >=20 > If the readline extension is enabled, PHP provides an interactive = shell > under -a. If it is not enabled, it falls back to an "interactive mode" > (yes, the difference between "interactive shell" and "interactive = mode" 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. >=20 > 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. >=20 > 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? >=20 > Regards, > Nikita Hi Nikita, if I may ask, would it also be possible to have deadline as a mandatory=20= dependency to always have the interactive shell available? Is there a = good reason to compile PHP without? Having a basic prompt available is really 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 if=20= we could simply have readline as a guarantee. Regards, Moritz=