Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107533 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80101 invoked from network); 14 Oct 2019 09:37:41 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 14 Oct 2019 09:37:41 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 0971D2CAF7C for ; Mon, 14 Oct 2019 00:21:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No Received: from box.beccati.com (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Mon, 14 Oct 2019 00:21:31 -0700 (PDT) Received: from authenticated-user (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.beccati.com (Postfix) with ESMTPSA id A345520020F; Mon, 14 Oct 2019 09:21:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=beccati.com; s=mail; t=1571037689; bh=JmJHEoEVi7FjtS3kjFFe2L2s3lqUSpJrBZceuZzswb4=; h=Subject:To:References:From:Date:In-Reply-To:From; b=kwPvCmDpOVhJIzgcI5NT5jMTJEE5yepCJnFfFjEf9PpJTG7WqxDsPV+8lX9q//nhj QVb/aKlXF7/ATvGOLhELBs6EBRSnBsH+2B0e12ZcFrjTSFURpsIOXFJH9MdgbInktJ 8rDhWLV+XlEgQxwvcy9g68sdrXu0zB3MB5M3T+BV7yqdv6VfINI/i7PUQtXXImQSE4 tmu+YxJcSXL0T7SJtgQ5/3HFLVdNjiKD/tjZPOYmKOM5J5QX//aDBIvQ1HZWXW01dZ G9ft7vqKb4iwJ+vaE+nB2KwR6s3xLinwnSITmifqwDKAs+0vNOU8wIarq/MyrGT7l6 1LlpXdoShfqDA== To: Stanislav Malyshev , Nikita Popov , PHP internals References: <9668613b-5e9d-e67f-6001-3d360775eefe@gmail.com> Message-ID: <41aa6793-84da-ee39-8425-8a2240fd5b72@beccati.com> Date: Mon, 14 Oct 2019 09:21:27 +0200 MIME-Version: 1.0 In-Reply-To: <9668613b-5e9d-e67f-6001-3d360775eefe@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Envelope-From: Subject: Re: [PHP-DEV] Warning for "confusable" types From: php@beccati.com (Matteo Beccati) Hi Stas, > Maybe we should just change the error message to this?> > must be an instance of the class "resource", but resource type is given> > OTOH, since there are actually no resource type hints, and naming your> class "resource" is an extremely bad idea, having a warning there> wouldn't hurt too. I was about to give my +1 on the more generic approach, but type hints could also be interfaces and "instance of the class X" is not a good fit. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/