Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116610 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37483 invoked from network); 9 Dec 2021 19:08:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2021 19:08:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DF04E180540 for ; Thu, 9 Dec 2021 12:08:53 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.50]) (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, 9 Dec 2021 12:08:53 -0800 (PST) Received: by mail-ua1-f50.google.com with SMTP id p37so12946758uae.8 for ; Thu, 09 Dec 2021 12:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lxbgaRZmNy0YC+kRcLYLF2/5ydHQdoo7Foxn/ObZrSU=; b=2I+or1ljYFBqjg0Sihekhdh1g5nxUxuzAvybHVFcdWL8Ak5BNlbZEbyf1ezc4miYXl B/IumVy036ghzwoAc0oxLsUJlt6jdHfDlQNjvvASCcNowx70I+P76BIifIWN+j1jq9tB RIViNAMIngCEVUOBtDV8XwASRvubg5XmQIW+GODwsFXuinGwhUXEXYASdSZkVLe5v/d6 KiOdSvtN83DIQiyGFJSbArp7VcCc1APH9tawx27XJay+jg4Uu2m7g/suscBgTlg+sCqL 64wo9XACjGEgkS1yKCYAN4K5f020nZDkRUotVTVqkFGOVYLj3Nua+TmWhkw4cth2klzT Z8cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lxbgaRZmNy0YC+kRcLYLF2/5ydHQdoo7Foxn/ObZrSU=; b=siQsU4laHjr2jzfmIhSYU0JyioFmxKpKS0vMeG763qW3uD/j0xcA9zU9xZPLxpNzrf JIAvhyY7YmK097l9WyW0uohnAs9wormWLbOG/5w6on3e1QVocnz6GdNyKryolG/CJ6ub dCLlw5p1xXuigC2t5uy7Ou+0ktLCTA2QNo+pZ3StHUQ75T00n3h9HcPDCkraF4PLCmPh InVcrTJQyCz7Mk25hSQTlnd7Hb1C5VFvIhQh0IM2GEl5UeAQ4ZfAAr9j1eZDvfaxw90z GogN30GTaCt5s1hKi4P7hfYunKeXw8saHTSBvjBiqCv6NorpzYOxdqElS8rW38djZhgg 5edQ== X-Gm-Message-State: AOAM532b7Mz/2bFWaM5/8ukf3961ADcwBjNYUzTs+oYf3RrlvA5GIskf n8RKT4ShmCBkUlTtQgB+9H9Vv5dkHf0+iGuQeoP06A== X-Google-Smtp-Source: ABdhPJwoDl2Jc/YA1IeKPegleOvVQ6qG8WB5BSrg7rQP8bopDJWqsk8sJf/I8FDJC9EnslFt86HnWjOroaU/NwZmBr0= X-Received: by 2002:a67:fdc3:: with SMTP id l3mr10427336vsq.42.1639080532464; Thu, 09 Dec 2021 12:08:52 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 9 Dec 2021 20:08:41 +0000 Message-ID: To: Jeremy Mikola Cc: PHP Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Automatic implementation of Stringable may conflict with old, untyped arginfo declarations From: Danack@basereality.com (Dan Ackroyd) On Wed, 8 Dec 2021 at 16:02, Jeremy Mikola wrote: > > > We haven't explored using stubs, but I'll keep that in mind. ... > (which we plan to do since we finally dropped support for PHP > 7.1). > FYI, the stub files maintain #ifdef info through their processing, which allows some useful shenanigans* e.g.: https://github.com/Imagick/imagick/blob/86d95fed787d60db110ccfeb2d89ec53f1d1f5f7/Imagick.stub.php#L168-L182 https://github.com/Imagick/imagick/blob/86d95fed787d60db110ccfeb2d89ec53f1d1f5f7/Imagick_arginfo.h#L748-L778 So the stubs are used to generate arg info for Imagick from PHP 5.4 to 8.1, across lots of versions of ImagickMagick. I'm finding managing function signatures in a PHP file, in standard PHP format, is a lot nicer than maintaing that info in C files. cheers Dan Ack * Though, tbh, I wished I'd known about /** @generate-legacy-arginfo */ before doing some of the hacks in the Imagick regen_arginfo.sh script.