śr., 14 sie 2019 o 12:11 Rowan Collins <rowan.coll...@gmail.com> napisał(a):
> On 14/08/2019 11:07, Michał Brzuchalski wrote: > > Exactly so how would it know from string name either it should load class > > 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? -- regards / pozdrawiam, -- Michał Brzuchalski about.me/brzuchal brzuchalski.com