Feature Request
| Q |
A |
| New Feature |
yes |
| RFC |
yes |
| BC Break |
no |
Summary
I would like to exclude specific sub-namespaces from the NotDependsOnTheseNamespaces rule.
Right now, I use this rule like this:
Rule::allClasses()
->that(new ResideInOneOfTheseNamespaces('App'))
->should(new NotDependsOnTheseNamespaces('App\Foo')
->because("...");
I need a way to skip some nested namespaces (e.g. App\Foo\PublicApi should be allowed as a dependency).
One option could be:
Rule::allClasses()
->that(new ResideInOneOfTheseNamespaces('App'))
->should(new NotDependsOnTheseNamespaces('App\Foo', except: ['App\Foo\PublicApi'])
->because("...");