Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115549 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78021 invoked from network); 22 Jul 2021 08:05:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jul 2021 08:05:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0CC87180503 for ; Thu, 22 Jul 2021 01:31:39 -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=0.4 required=5.0 tests=BAYES_00,BODY_8BITS, SPF_HELO_NONE,SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS20694 188.94.24.0/21 X-Spam-Virus: No X-Envelope-From: Received: from scarlet.netpirates.net (scarlet.netpirates.net [188.94.27.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 22 Jul 2021 01:31:38 -0700 (PDT) Received: from p5de2c364.dip0.t-ipconnect.de ([93.226.195.100] helo=[192.168.178.42]) by scarlet.netpirates.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m6U7D-000sDE-Uo for internals@lists.php.net; Thu, 22 Jul 2021 10:31:35 +0200 To: internals@lists.php.net Reply-To: internals@lists.php.net Message-ID: <5319a8c8-f63a-fa5d-141b-2885b21d1113@php.net> Date: Thu, 22 Jul 2021 10:31:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Method compatibility checks and order in which files are included From: sebastian@php.net (Sebastian Bergmann) We noticed that the PHARs of PHPUnit stopped working with PHP 8.1 [1]. Before [2], a commit pushed today, PHPUnit loaded all sourcecode files packaged in the PHAR on startup (to work around problems that (hopefully) no longer exist because PHPUnit's PHAR is scoped using PHP-Scoper nowadays). This loading of all sourcecode files lead to the error reported in [1]. The "static include list" used for this is generated by PHPAB [3] which performs a topological sort based "class implements interface", "class uses trait", "class extends class", etc. dependencies. This topological sort does not, however, consider type declarations for properties as well parameters and return values as dependencies. What follows is a minimal, reproducing example: . ├── autoload.php ├── Collection.php └── CollectionIterator.php 0 directories, 3 files This is the contents of autoload.php: