Feature Request
I would enforce a rule on a deprecated namespace.
| Q |
A |
| New Feature |
yes |
| RFC |
yes |
| BC Break |
no |
Summary
I would like to have a DSL like this:
Rule::noClass()
->should(new ResideInOneOfTheseNamespaces(
"Prima\Service",
"Prima\Entity"
))->because("Those namespaces have been deprecated in favor of the new modular architecture");
This rule is already implementable in the following way:
Rule::allClasses()
->that(new ResideInOneOfTheseNamespaces(
"Prima\Service",
"Prima\Entity"
))->should(
new NotResideInTheseNamespaces(
"Prima\Service",
"Prima\Entity"
)
)->because("Those namespaces have been deprecated in favor of the new modular architecture");
But it looks awkward to me to read.
Furthermore, it would be easier to express rules like the following:
Rule::noClass()
->should(new HaveNameMatching("*Manager"))
->because("of our naming convention services should be named with a more self-explanatory name");
What do you think?
Feature Request
I would enforce a rule on a deprecated namespace.
Summary
I would like to have a DSL like this:
This rule is already implementable in the following way:
But it looks awkward to me to read.
Furthermore, it would be easier to express rules like the following:
What do you think?