Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125964 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 qa.php.net (Postfix) with ESMTPS id 07A011A00BD for ; Fri, 15 Nov 2024 17:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1731692328; bh=76cySaGPT1Yv+lwNKgYdIlhQwRR2SGgUrHS99EdiQd4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Rlxma4R5nhqBhd45eZv5iuTXMpOW28eueRpGSBmVeMIQWU2DlytHn7j6mD7uIsKg9 MQAHyr13vPePap3DqEDufQKWXyVwCg/RhuEzw6zAF8BxrxHwflu0aYsN1FpGnoCFpQ yytk55OTSVOYPWfMtlrS7Qb3uN3PWLFKq0D7erv4oaBX4FP1FMXpjc2onQnjHhGflx maaihVzck2tTqgx6fV5KUpsc/YU2sIa4YzzbWHmzK/7+oNg3iQZUDdqGHWyBtlaN1T CRQdO86ZkXNW9ZWu5GSmTfg5o6L39UPr2aayteHpO7L4Hda73H/YJxQhZNYo47YZfW fM525Uv4XRRFg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D1953180086 for ; Fri, 15 Nov 2024 17:38:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 ; Fri, 15 Nov 2024 17:38:44 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-382296631f1so461435f8f.3 for ; Fri, 15 Nov 2024 09:36:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; t=1731692165; x=1732296965; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=76cySaGPT1Yv+lwNKgYdIlhQwRR2SGgUrHS99EdiQd4=; b=I10QOCAKmJe6+Z7Djm7IoszrVvWVNmc/ikkphEEflbnFOTBTZ7F0g1Bdia4Qv922Y2 xe55DfXjG9UC3BnMDs4g0Eyl0opuoqa98JdbTGVAqv5ANKeYOZ9O00nRXMsXjq7RWUKc eDIlkyYSliegFV+9+if2W7p0VyQ5/AyBCb968= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731692165; x=1732296965; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=76cySaGPT1Yv+lwNKgYdIlhQwRR2SGgUrHS99EdiQd4=; b=Q3m6fVPlcUHci8BvbhSnuA6YJ29bTiQKHMXtApqkhe8faBHwaoz1jA4uniTaxwsgOQ us+R6Ccy6lWS0c15giVTYJPv1ZGracbiPbE1GmXcW0J1k3pLKd4BAHIAXGSAoClKVxCH S84Z7Jm1w2EpyXvV7ee+RkAQd/ksRba7cz5p7tGjOOCc7xXac3oRT2PWtk6wdGTISLxe 6V0OeRyU2E3JdRkLqCiN+n6olXC+fvFwBWd4x4RnKCCZRJ+7AB62FuuO/yzn7vq/21bn H0ZRSr5pCZNfKrAyYJELkiRSZcHcFCuzO+m2Gjh9T7DV+a6aXFYjb7ADtRG8sbLU2a+y Un7Q== X-Forwarded-Encrypted: i=1; AJvYcCXENcRQFeJSvSqeee+kKtiz8MtZjniMISINqv5NQPBZO/XYcNuxlhLA+sVwJFLckokQaShXIZUtIZM=@lists.php.net X-Gm-Message-State: AOJu0Yw4YUiwOyDYl1lxWZX4e4DifcSakcNSLUBlHJz43EAEFWJJrnbn g6M2hLP8rscwdnjRPYQirYH09PJO3gBUoI9EZKbFXbixlsP9cz15BAAO60AOkVeW1ZSvVF1nnKq HIDM87Sbv9kpn6MMFA1UNyylPa2IVN5Kf0ATtRw== X-Google-Smtp-Source: AGHT+IG4fuT6HIYTi8Re8b5B0Y18uGGn9peXU+UP4d039vy0BZwu1T4TKARMxBqo2+hgamdBCOmCQpStYJsU3lUqNRg= X-Received: by 2002:a5d:648b:0:b0:382:222b:1320 with SMTP id ffacd0b85a97d-38225a295e6mr2771408f8f.22.1731692165211; Fri, 15 Nov 2024 09:36:05 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <461FD462-72A8-42D4-B6A2-CA10AC5CA395@gmail.com> In-Reply-To: Date: Fri, 15 Nov 2024 10:35:54 -0700 Message-ID: Subject: Re: [PHP-DEV] Make Closure covariant to callable To: "Gina P. Banyard" Cc: Claude Pache , PHP internals Content-Type: text/plain; charset="UTF-8" From: levi.morrison@datadoghq.com (Levi Morrison) > > There are some weird cases with `callable` which is why they aren't > > allowed as a property type. I don't remember all the edges, but if we > > are sure that we cannot hit those with simple co-/contra-variance, > > then I don't think this needs an RFC and we can just merge the PR. > > The reason that callable is not allowed as a property type is due to scope/method visibility issues. > See the discussion section of Nikita's Deprecate partially supported callables RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables#discussion > The callable type is allowed as a parameter and return type, and Closure is "better" defined than just callable. Then personally I see no reason to make this an RFC and would recommend merging it in as a gap in existing features (not really a new feature).