Getting this error when I put
Warning: The use statement with non-compound name 'Blog' has no effect
use isn't the same as C++'s
using namespace; it allows you to define an alias, not to "import" a namespace and thus henceforth omit the namespace qualifier altogether.
So, you could do:
use Blog\Article as BA;
... to shorten it, but you cannot get rid of it entirely.
use Blog is useless, but I believe you could write:
use \ReallyLongNSName as RLNN;
Note that you must use a leading
\ here to force the parser into knowing that
ReallyLongNSName is fully-qualified. This isn't true for
Blog\Article, which is obviously already a chain of namespaces:
Note that for namespaced names (fully qualified namespace names containing namespace separator, such as
Foo\Baras opposed to global names that do not, such as
FooBar), the leading backslash is unnecessary and not recommended, as import names must be fully qualified, and are not processed relative to the current namespace.