I have a simple CRUD module for Magento 2.
When I run the static tests I get the following error/warning.

"Incorrect namespace usage(s) found in file..... <Vendor>_<Module>".

The issue is caused by this line in my file


I also tried this approach:

const ADMIN_MENU = '<Vendor>_<Module>::<menu_item_name_here>';



But I get the same result.
For core modules, this does not happen even if they have the same approach.

How can I get the static tests to shut up?

Ideally, I would like a clean solution, but I can go with "hiding the dirt under the rug".

Alternative: How can I set the active menu without upsetting the static tests?

Any clean approach would do.

  • I am tracking down the same issue... – barbazul May 30 '17 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.