Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113710 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58959 invoked from network); 23 Mar 2021 05:09:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Mar 2021 05:09:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3B3E4180504 for ; Mon, 22 Mar 2021 22:04:40 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, 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-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (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 ; Mon, 22 Mar 2021 22:04:39 -0700 (PDT) Received: by mail-pg1-f177.google.com with SMTP id n11so10504962pgm.12 for ; Mon, 22 Mar 2021 22:04:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:references:from:subject:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=mXzSRCIK3J0vEuDCsb0Up5myLI7XoJw8VxhNJRmj9UQ=; b=ndDiKf1ClxWq5xH4T6L3/cQVYQakEgwYu8kl+PkPKeQ7zJ5hXT4jLwbmUvpZCk1aEV 2lZ1JcUN6dHnH/KubewYFLqLVmSqNQQNs13F+wvy0EucP7nyh4fdHBSi+3vHCLDYWbBe dfuflRSlfMDkE24Go+halw2eZ5BQvw+WpObmhzQboD18bQ3AP61SkUOGwAM0rSPtlOHd FAza+KvX+L3jb5tsaJd3Gts7E5e27+e+MDl7lbwD5LcNbvG9NsFT2NXTT1V0S3qOqnGk XEBcSzsxDZH3cpnVoNCYB8Rr5a/eyNU33p7sNS3yFVIqXlo0WkKMs66TF8W85ktCpqM6 zTmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mXzSRCIK3J0vEuDCsb0Up5myLI7XoJw8VxhNJRmj9UQ=; b=aD+K2AydfhcHeV4jWVfpUp7zuokoMxealHL31jBoXPLIn4kMoKNB87ABiorZ+jBFrl c/Q4wqVlnuQXbB9rPnuY4y2LbLuo8UAM7+2slXDeSUYPLPqhI1P84Z7JM4NDdlYQHqF9 1WtJjN1UfWQXI7RslOzGp6y7SHyWY3PajauoT0Drb/ve/RMZ3ZeOpceJ/CD/FjYtFZz9 v0o4CYDudSf5UfRRaH0/bqD36WzBfqeCbjKuaP/Nb0cP+oS2ZYfh83VYDj0nY0bC/nOC ZVs7ksITDHLgq0JVyh6+YQ/ah/Lf/pchcLzERjVx07YjRTICC/q+iWndb0hrDos6uo/r BxYw== X-Gm-Message-State: AOAM5320kNxOJ1qVWATMrp+HSHVj2+feT808bIDCfc84dr5BjT4FERPG FKJq62Wt2lqPKY1od3pLB2K19lf1z5ca X-Google-Smtp-Source: ABdhPJxoilU50kgMv5uX5R3Td5yr259Dcs3atw3PE86mV48xHQyjbao1E9/a0fjkXT0leeMbB04MAw== X-Received: by 2002:aa7:93af:0:b029:1ef:1bb9:b1a1 with SMTP id x15-20020aa793af0000b02901ef1bb9b1a1mr3189654pff.49.1616475878058; Mon, 22 Mar 2021 22:04:38 -0700 (PDT) Received: from ip-192-168-8-5.us-west-2.compute.internal ([2601:646:8d80:9130::b03b]) by smtp.gmail.com with ESMTPSA id l25sm5661478pgu.72.2021.03.22.22.04.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Mar 2021 22:04:37 -0700 (PDT) To: internals@lists.php.net References: Message-ID: <28be190c-21ea-b796-cec7-b8db21d14eca@gmail.com> Date: Mon, 22 Mar 2021 22:04:37 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1 From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > date_sunrise() and date_sunset() Do we have any information on usage? I am generally not a fan of deprecating functions that work - even if they are odd and have quirky APIs - but if the usage is essentially zero than it might be ok. > key(), current(), next(), prev(), and reset() on objects I'd be happier if those worked with iterators. Except for prev() which I don't think many people need. > mb_check_encoding() without argument No objection. > get_class(), get_parent_class() and get_called_class() without argument I'm not sure why. I mean if we want to make them return the same as self::class etc. - up to the point of actually compiling them as such - no problem, but I don't see why they need to be deprecated. And I vaguely remember seeing get_class() at least a bunch of times in old code, when ::class didn't even exist. I don't see a good reason why that code should be broken. > FILE_BINARY and FILE_TEXT constants No objection. > t fopen mode I'm afraid there's - despite the warning - a bunch of code for Windows that relies on "t" and I don't think we should be breaking it. Is there a good reason to drop this mode? > Passing bool for $amountOrUpOrDown argument of IntlCalendar::roll() > Accessing static members on traits No objection. > strptime() > strftime() and gmtstrftime() We have to remember many applications do not need to be portable, as they will ever be only run on one setup - the one that the company running it has. So non-portability itself should not be a fatal problem. I am worried by musl thing mentioned - what exactly happens on musl, they don't have strptime()? If it's just different outputs or some options not supported, I think it's ok - warning in the docs should be enough. > mhash*() function family No objection. > ctype_*() function family accepts int parameters Here I think adding notice for int arguments would be appropriate, but changing the behavior is not - we could cause some very nasty breaks in the code if we suddenly change such a basic thing. > Return by reference with void type > NIL constant defined by the IMAP extension No objection. > Calling overloaded pgsql functions without the connection argument I hate global state, but there are a lot of old quick-n-dirty scripts relying on stuff like that. Can we maybe check how common is usage of this pattern? > $num_points parameter of image(open|filled)polygon > mysqli::init() No objection. -- Stas Malyshev smalyshev@gmail.com