On Tue, Jul 30, 2019 at 10:12 AM Michał Brzuchalski <mic...@brzuchalski.com>
wrote:

> IMO this would create a lot of problems cause name in Composer Package
> doesn't reflect used namespace declared in autoload, for eg.
>
> Composer package name => used namespace
> ---
> ocramius/package-version => PackageVersions\
> doctrine/collections => Doctrine\Common\Collections\
> symfony/console => Symfony\Component\Console\
>
> --
> regards / pozdrawiam,
> --
> Michał Brzuchalski
>

Hi,

This might also cause issues in scenarios where packages would register
autoloading of a conflicting namespace. If for some reason the namespace
clashes with a vendor, or vica versa, or a vendor package "hides" an
additional namespace in the package and overrides the declares that way, it
could cause a lot of problems.

Would it be an idea to first establish the concept of a package within PHP,
rather than deducting it based off a namespace? If packages would be a
thing in PHP, other than just a namespace, package private could also be
implemented as visibility modifier for inheritance and class visibility.

Regards,
Lynn van der Berg

Reply via email to