Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127807 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 742671A00BC for ; Mon, 30 Jun 2025 15:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751298277; bh=2yyvnrHzDHY7YeElwVWEvnTxThfxLYhVXJGkrKOWJsM=; h=References:In-Reply-To:Reply-To:From:Date:Subject:To:Cc:From; b=VDB3/n6n8HJzBC92r8Iz8s2gpuOFKzK5tL35Y5a8YddwnDzdDLgyD8ZfnQ7JGpAdw NGc3hEeWQXfHxscBZw8qE8Y59gvZ248ecrg+bEbej0+tS6508HLrBEgF+ZfyKn7Sj4 PoYlBw19BdvD+Xd33uPw28O75jgII8QjQJDlPaYmGJ4+NKWPwLV5Yo9I9VcMEH8ePf mt8x47PKa7IqLYWqxiMrQsCkn9pr8QbVc6t80XHvoI7j7EzXUKmGi60nYyPawn0dIb DyYtVb//CFFKvzr3BlQa/c4uQViMzYfOjQwEviGanXubd/WjJ5GNr6uQFRRuEa4PGX Dx75TskgIJ5Tg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E8586180656 for ; Mon, 30 Jun 2025 15:44:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, FREEMAIL_REPLYTO,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 30 Jun 2025 15:44:36 +0000 (UTC) Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-3ddd68aeb4fso39333445ab.2 for ; Mon, 30 Jun 2025 08:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751298389; x=1751903189; darn=lists.php.net; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YS7CY0nlefoi0c+egb+MQ1W5MIEEJN4lTiwDyWFUdu8=; b=GL49gm+5TqjShvH2Q5RHL8v2tmlhiRcYRO664Moy81UAFc4y8hwmLaHXAM8pampSj3 lte0I7qiP/NqVHmttMcbs4/sr2JqZGWtt/ZwfTov37ofzQ/34Ob7MkgvgGOz56bpG3q/ 3olC67Plue7RvqeB4umiagh7jmICABoyiHxj8TTh7WAODnuZNeT9bCbCLhJy82bEyBHH 1vp+ozjNNE9SbzXcYsOgZxU8j+trY9GmQRZwawoDb0kN24SPWBERNXmzr/DHl0L1ysSm 4n7ZX8DuUcwVADUJJ3Aisv9OLrz6UnzGyKHhTfcrmighKccb5k0JPWmCw/GrkatAyvHz N+VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751298389; x=1751903189; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YS7CY0nlefoi0c+egb+MQ1W5MIEEJN4lTiwDyWFUdu8=; b=Xalsrtu+bsd7FBbncZpNKJTcQgpUQXkCWIPBaDQlI+mOFYX7RQY0wB5iEuiMrLJfa9 lwnSN6b6iMk/VFJ4joLu8hW31cs54XzlLWX9atMOOY2nL3h4LqS/WzaAOMYLbLNlC1OH fqHhmHdrm1qm9/FmFP9BgzBlmC7PvNfX80bghXhW3lwexVqSfxp6pEuND9b2ZXZkbOcv DrgYaxRQWQ2aL0KtkMhQkMKrdb1yoq+/VQ3lKZPLauxUvDehElGqN0oQJFvEa6ERdxfZ 6yFdaXMMBl4WG0M1W7Y1XLHgsrCtwOshermjcxr5JTbNk62Ks15C0sk0b/M/N66JsjLz HDCw== X-Gm-Message-State: AOJu0YwvX8u8zu2wSWNiZoEIVt29DmoLdJlqIUplS6yQL07L8trTad80 /S4/SuT5BxeF30gvQnp4dyVR3rqNuBr4uhaopCRA6F0aaihex7QghhAUGeSfdGWerjFutBa/7Jm Ic/k9fIVgqottqjHQE6VTsKmZnq7dZnCdyw== X-Gm-Gg: ASbGncup5riCIQ5o875NU6DRVr02G2FUCI65bKhf4ywCFx+0nOaZEb/CIo6hjrhpOs3 wCs9mzcO1WLg+9N7pIsvi+teTtdrzNUKw0MrvNwQUqfb8GiefZ4bYggy8S7OzxM36YlZ7HOOhUB SdrimI6W0ALKwJ3DK1FnZ8XtgQ74VWuDFCFPYSKz4VXzr0PLP1wKFEZl4Jp5gWhaWBlJ3e7xlcS zK4FXFAZp8/ggov X-Google-Smtp-Source: AGHT+IEvZHTdhP5MJf/z2tTrd7Bqo4zYN66N9+31GeSYsKmxgJmh25AJ8D/Jv2mBt1ZtULUuY45xtvdewPc6YpwsEaM= X-Received: by 2002:a92:cda9:0:b0:3dd:e7d6:18bb with SMTP id e9e14a558f8ab-3df4abb7595mr144686075ab.17.1751298389517; Mon, 30 Jun 2025 08:46:29 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Reply-To: erictnorris@gmail.com Date: Mon, 30 Jun 2025 11:46:11 -0400 X-Gm-Features: Ac12FXzmJVn97ffrcBHsOCNhXupXdcYRQDuc2Ysw_s2RfvRKFFtnJJ51dFMnW_4 Message-ID: Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Object-oriented curl API v2 To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" From: eric.t.norris@gmail.com (Eric Norris) Thanks for your thoughtful response, Larry! I agree with your summary. > 1. Status quo is fine. PHP core not having a user-friendly way to send HTTP requests is acceptable. Maybe make Curl a little nicer, but only to make life easier for Guzzle et al. > 2. We should develop the Curl API until it's usable for basic HTTP behavior, but no further. > 3. We should bundle an HTTP client that wraps Curl (with or without minor improvements to Curl), exact scope TBD. > > Personally, I'm open to either 2 or 3. 3 is more bikesheddable, but possibly the better end result. > > Where does everyone else stand? Based on the feedback so far (I do plan on waiting for more responses to your email), and on my own preferences, I wonder if there is a hybrid option I could propose. Perhaps the RFC could offer both a \Curl\Handle (tentative name) to address position 1, and a \Curl\BasicHttpHandle (also tentative name) that addresses position 2? If people were amenable, I'd even make the BasicHttpHandle a separate vote. I agree that 3 is both more bikesheddable and also possibly ideal, but I feel my above suggestion maybe strikes the right balance between the "status quo is fine, I don't want to see random HTTP-related methods on my low(est)-level curl object" and the "I'd like to do basic HTTP stuff with curl, without a library" crowds. Barring that, my preference would be 2, but I'd accept 1 just to have it pass - like I mentioned elsewhere, I think there is value in introducing namespaces and object-oriented APIs for "modernization" and language consistency reasons.