Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123592 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 2BE2F1A009C for ; Thu, 13 Jun 2024 06:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1718261817; bh=liHF7vHPxhA5BCIMlQUHrvFYiXAdMxf+nQEnJiXNANc=; h=From:Date:Subject:To:From; b=Fl/dw8AFAa7Py+CdJxvYOG3SI9iBF/P37dubGz4IWILvtKaKgjyMJTJhRJCtpcx5l xuR9HPfleJIB0M5/wEZ/OtlnQdNjhGd+me+T23WfmeRi5/2PDIo3HKyzEHvI2Jt2+n iOQnPerTJDkSWL+PaxY0Zuz9DdlUCatuXT9Gz/xI2DRDJV0YEn15yt7cB0YR0mQPQ1 g1JaBp3lIvzGm2GQtNijJbXgroXxdJQG5FpFxNhV7m2qRpmp6zqKN6b8gzEpJymeh+ ejrWTDQtEHC7I0YKTsjwd05Ma4AMcmkaHByM+wFWCA/BlKXOXrj9YQg7nMg8CbOtRI smVdd91iAwxaA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 46FCB180041 for ; Thu, 13 Jun 2024 06:56:56 +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,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (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 ; Thu, 13 Jun 2024 06:56:52 +0000 (UTC) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2bfffa3c748so503179a91.3 for ; Wed, 12 Jun 2024 23:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718261743; x=1718866543; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=liHF7vHPxhA5BCIMlQUHrvFYiXAdMxf+nQEnJiXNANc=; b=PoZAkzbu6DbHWC3CM5idDMyfkTwBrMLx3tnSRE5tlUzZ4jdrV4yj9MknHVElVQ0Lkz 1PyqY8Xn8VPFvwEcQ0tIDC2X2s7GwKh06ZhaO639nCSamYpC9o/qBHXimbMGXsyWpMda WjjT4qPb7nnxTeoSLnfgUjgleGo6jOWZdJjqVMdzhZ3a00Zt31J5POizKpbyM3g0/dsz N/dYQ4zPTD0FvzAVoNAZdVdQgjOWGxfMz6RX8D5Hsow2G/xSgROKvU9AlshDwGNVVDYw FH7sRjwq/hSR22UPqsIcPmoSAToT21168fCZOuGBcfzFz02CtUbDeKTQkF0afpx+UTb8 X0bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718261743; x=1718866543; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=liHF7vHPxhA5BCIMlQUHrvFYiXAdMxf+nQEnJiXNANc=; b=qJOZrCgUZm/0O9axXAm8lf8plHZ19QQ+ELE1JyZ17MQ33Nl6KjogzETzhulbdLc+dJ HB0qMkU4LsyDG8+270cYEW/0zjaKvzEzi94GgsGc5r+cy0gutYL+UQIsELBZKzwLKGIm MP+EpoOOaQPjFp9q933Doy6Vu+k3Kakr+NrqKxuF57SBtpwruj0hyfrZksjAtYacQjIY G+Esj+DvaIgpoxKg3CBmWlpoQhRKMj4e97tr/ZVc9eUwQTln4fJY4h0uxhfKmJXI4nlA NRR01tycZsYRbd9ly0zQMKuCRjJB786OQFKBUUTRZ7uu2PJMND1t8kDHpNK2FKWikpuO 7XOw== X-Gm-Message-State: AOJu0YyNKImNfnDn53S5QmLYenI3/xEZTmxhROJ2E9uP8EZFentsEf4/ 5yyPaJfX72anlBhgMNn+IbXCytlcH0XcxkKmLCYr/5PwvayiiXP6T0WW6Kn0ui6GjAOqNCHqjTF mvR8bXYxwMvobWWZ7x0bV6bkK7dg2Ej14aGc= X-Google-Smtp-Source: AGHT+IF6iWy1bC8ES9lBMFHInBGk4bpyQCPKfS7ZNJsTpe+yHVP2BA0H78zvH+VqijzIthl/fg2x7l70QswAq7UBhzY= X-Received: by 2002:a17:90a:f195:b0:2c4:bdf2:b521 with SMTP id 98e67ed59e1d1-2c4bdf2b690mr1527879a91.45.1718261742525; Wed, 12 Jun 2024 23:55:42 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Date: Thu, 13 Jun 2024 08:55:31 +0200 Message-ID: Subject: [PHP-DEV] Follow up of DateTimeException RFC To: PHP Internals List , derick@php.net Content-Type: multipart/alternative; boundary="000000000000cb62e4061abffcf9" From: misterdeviling@gmail.com (Vincent Langlet) --000000000000cb62e4061abffcf9 Content-Type: text/plain; charset="UTF-8" Hi, There was an RFC about more appropriate date exceptions https://wiki.php.net/rfc/datetime-exceptions implemented in https://github.com/php/php-src/commit/66a1a911f1d6cd4b89c0bb5577fa77f1d6a2cb96 Looking at PHP example, it updated method return types like - Datetime::modify - DatetimeImmutable::modify - DateInterval::createFromDateString https://3v4l.org/iSPL9 These methods doesn't seem to return false anymore, but the PHP stub wasn't updated so the reflection class still consider false as a valid return type https://3v4l.org/IZXbp. Is there still case where such method can return FALSE or should we update the signature of these methods (and maybe some others) ? Thanks. --000000000000cb62e4061abffcf9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

There was an RFC about more appropriate date ex= ceptions

Looking at PHP example, it update= d method return types like
- Datetime::modify
- DatetimeImmuta= ble::modify
- DateInterval::createFromDateString

https://3v4l.org/iSPL9

These metho= ds doesn't seem to return false anymore, but the PHP stub wasn't up= dated so the reflection class still consider false as a valid return type= =C2=A0https://3v4l.org/IZXbp.
Is there still case where such method can return FALSE or should we update= the signature of these methods (and maybe some others) ?

Thanks.
--000000000000cb62e4061abffcf9--