śr., 14 sie 2019 o 11:49 Rowan Collins <rowan.coll...@gmail.com> napisał(a):
> > You suggest that it would trigger autoload to load "MyVendor\MyPackage" > > but current autoload machinery is able to load only classes, > > not even functions or consts! cause it gets the only class name now. > > It would need to be changed anyway. > > > As I said in another reply, this is only the same change that needed to > be made to support "trait" alongside "class" and "interface", or would > be needed to support "enum" or "struct". The userland part of the > autoloader already doesn't know which of those it's looking for, so the > only constraint is that the names can't collide, so you couldn't name a > package the same thing as a class. > > 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? -- regards / pozdrawiam, -- Michał Brzuchalski about.me/brzuchal brzuchalski.com