Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114748 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41189 invoked from network); 6 Jun 2021 01:27:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Jun 2021 01:27:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 272B31804CC for ; Sat, 5 Jun 2021 18:41:27 -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.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, 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-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 ; Sat, 5 Jun 2021 18:41:26 -0700 (PDT) Received: by mail-pg1-f180.google.com with SMTP id t9so11038145pgn.4 for ; Sat, 05 Jun 2021 18:41:26 -0700 (PDT) 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:content-transfer-encoding; bh=1fJEmiCqcGc95Wy3QNrqkfik9ol5MX88HPdY641gQoU=; b=eoFcS+EqWq83gZZP+vU1bJ1nJHm+ctYmic3Zx0dTJHtwRs4kpKRPFxs7DHHod5dT/i xXFLUq7v/LqF7vIDhi3Vmbs8W+1sq964yr+uGbSpkKL2Of47kLWXuaNvjkBiy2Lah+K9 dx6OQAwaO9LdnXQRM5zkgQNomkAlLQYUAFIrXdJnTtcznD8eZqGZtZqtMDJJn/rEPY1a LsBhvmPorsNxXPdVAnQg3KEG/a4jCZ4P0RvBxaHKj6PnNj/gXETNvXMDxeoIaZHzFoPD NMndKm2VIEspEctsmM9CYDLckluvAS2ohz297fimkS9iWAMR/OUGL76qNZh6wP15FUUK eZJg== X-Gm-Message-State: AOAM531A+RDczKDvVomtglXWcrxh2R1XaZXbNBHiSnP0wmSpKB6VdpbT DRjowMlJtnh2sgUfWZo5yWex+pqsZcoBuEPojsU= X-Google-Smtp-Source: ABdhPJxmNSphxATMV/OP3Y0NLIT3Z1ZI/VNq0U1joqKu7RY1K6U6qj1/bHRh6O0kwTKlWc/spK2Aru0lKH/kjRcmdKI= X-Received: by 2002:a63:f557:: with SMTP id e23mr11857565pgk.55.1622943685538; Sat, 05 Jun 2021 18:41:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 6 Jun 2021 04:41:17 +0300 Message-ID: To: Ayesh Karunaratne Cc: Ben Morss , PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Propagating AVIF support from libgd into PHP's bundled gd From: kalle@php.net (Kalle Sommer Nielsen) Den s=C3=B8n. 6. jun. 2021 kl. 00.09 skrev Ayesh Karunaratne : > > Hi Ben, > Thank you for opening this PR and the discussion. With the wide > availability of AVIF/AV1 support in browsers, I think this will fit > nicely. > > We have the Namespaces in Bundled Extensions RFC > (https://wiki.php.net/rfc/namespaces_in_bundled_extensions) passed, so > perhaps, the new functions are probably better in the `Gd` namespace? > This would mean the new functions would be `\Gd\imagecreatefromavif` > and `\Gd\imageavif`. They are inconsistent with the existing functions > of course, but I thought to mention it because it's a recent proposal > and I don't think we added new functions after that RFC. Some examples > are recently renamed PHP classes in IMAP, Pgsql, LDAP, and FTP > extensions to follow this new proposal. I don't think it makes much sense to do that for a single function, because it makes the API cluttered, as why would I call `\Gd\imagecreatefromavif` when everything else is in the global namespace? That is a poor design, while I understand the intentions behind it is good. I think this needs to be well thoughtout in a topic on its own rather than off topicing it here, so I will leave it at that. Overall, +1 for adding this --=20 regards, Kalle Sommer Nielsen kalle@php.net