Compound namespaces with a depth of more than two MUST NOT be used. Therefore the following is the maximum compounding depth allowed:
While it should be clear that this restriction of two namespaces is specific to the use of grouping, I was confused for a bit whether it was meant to limit all namespaces to a depth of 4 total, 2 beyond the package namespace. This was because "compounding" is not what I've ever heard that called (always heard it called grouping instead), and because all the examples in that section, even those that do not have grouping, are limited to a total depth of 4, except the example of what is not allowed.
Leaving this on @Crell's request:
The PSR-12 documentation has this section: https://www.php-fig.org/psr/psr-12/#3-declare-statements-namespace-and-import-statements
While it should be clear that this restriction of two namespaces is specific to the use of grouping, I was confused for a bit whether it was meant to limit all namespaces to a depth of 4 total, 2 beyond the package namespace. This was because "compounding" is not what I've ever heard that called (always heard it called grouping instead), and because all the examples in that section, even those that do not have grouping, are limited to a total depth of 4, except the example of what is not allowed.