relesbao / php-service-skeleton

A PHP skeleton for a service oriented architecture
MIT License
0 stars 0 forks source link

Skeleton Namespace #7

Closed wandersonwhcr closed 7 years ago

wandersonwhcr commented 7 years ago

Is there a reason why your skeleton doesn't have a namespace in composer.json?

wandersonwhcr commented 7 years ago

Is because all namespaces must be found inside src directory?

Example:

<?php

// filename: src/FooBar/Action/BazQux.php

namespace FooBar\Action;

class BazQux
{
    public function __invoke()
    {
        return __METHOD__;
    }
}
relesbao commented 7 years ago

Yes, i found that using PSR-0 pointing to src, developers are free to use whatever namespace they want following PSR-0 rules.

wandersonwhcr commented 7 years ago

ty!