Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106592 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73604 invoked from network); 14 Aug 2019 12:48:56 -0000 Received: from unknown (HELO poczta.brzuchalski.com) (188.165.245.118) by pb1.pair.com with SMTP; 14 Aug 2019 12:48:56 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by poczta.brzuchalski.com (Postfix) with ESMTP id B249D298423A for ; Wed, 14 Aug 2019 12:17:33 +0200 (CEST) Received: from poczta.brzuchalski.com ([127.0.0.1]) by localhost (poczta.brzuchalski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JxKjPm3IsqRy for ; Wed, 14 Aug 2019 12:17:29 +0200 (CEST) Received: from mail-ot1-f48.google.com (unknown [209.85.210.48]) by poczta.brzuchalski.com (Postfix) with ESMTPSA id 0EF702984233 for ; Wed, 14 Aug 2019 12:17:29 +0200 (CEST) Received: by mail-ot1-f48.google.com with SMTP id g17so30075590otl.2 for ; Wed, 14 Aug 2019 03:17:28 -0700 (PDT) X-Gm-Message-State: APjAAAUFy6w3Npj06V29d4XsSPgbcodbAmJ0waxeGR7V6IAYyAfPtRxm BGrto5hko0/0e92bL21rzYawnbuj3/g6r5Bp+h8= X-Google-Smtp-Source: APXvYqyklddWvBrGtHL9OAKyEPiCSQQi8yivlSfPuvgKbo/9j8QnFA7NLj9DkA20KMexE0mzYS92zKuyNCfetITTqw8= X-Received: by 2002:a9d:5e18:: with SMTP id d24mr6105027oti.182.1565777847878; Wed, 14 Aug 2019 03:17:27 -0700 (PDT) MIME-Version: 1.0 References: <25d774e8-183b-d39c-4ac4-81c1b7770229@gmail.com> <5d5298a5.1c69fb81.b4ed1.2d97SMTPIN_ADDED_MISSING@mx.google.com> <3db68c5e-54d1-812f-bbf5-1b089cba1bff@gmail.com> <5d52f72d.1c69fb81.8f95f.57a1SMTPIN_ADDED_MISSING@mx.google.com> <2bcb05d6-abf6-4fcb-599e-eaf4bcd58878@gmail.com> <182a6bd5-4057-7ba1-2cca-ab0be37e0b75@gmail.com> <72896017-20d0-16af-b188-8500777f947b@gmail.com> <00eea416-23be-6629-2e94-4cfa9f5fcb39@gmail.com> In-Reply-To: <00eea416-23be-6629-2e94-4cfa9f5fcb39@gmail.com> Date: Wed, 14 Aug 2019 12:17:16 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Rowan Collins Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000006b8a3c059011107d" Subject: Re: [PHP-DEV] [RFC] Namespace-scoped declares, again From: michal@brzuchalski.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=) --0000000000006b8a3c059011107d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =C5=9Br., 14 sie 2019 o 12:11 Rowan Collins napis= a=C5=82(a): > On 14/08/2019 11:07, Micha=C5=82 Brzuchalski wrote: > > Exactly so how would it know from string name either it should load cla= ss > > from src/Foo.php or src/__nsmeta.php if there is no information? > > > It wouldn't. It would include src/Foo.php, and that would have the > definition of something with the name "Foo" - either a class, an > interface, a trait, or a package. If it wasn't what the engine was > expecting, it would be an error, just as it is right now if you write > "implements ClassName", or "new TraitName();" > Following that would introduce unneeded additional directory hierarchy level in a usual library which uses PSR-4 which is the most used one, right? /composer.json /src/Foo.php /src/Foo/ <- all package classes should go here? --=20 regards / pozdrawiam, -- Micha=C5=82 Brzuchalski about.me/brzuchal brzuchalski.com --0000000000006b8a3c059011107d--