Skip to content

What is the replacement for ‘require_once’ in PHP for Magento2 to resolve CodeSniffer test issue in Magento store?

I’m a beginner at PHP and Magento have developed a Magento2 extension and used this line code in it:

require_once '/../knownuserv3/KnownUser.php';

But when I tried to put my extension in Magento Store, I got a series of test failure from Code Sniffer, which I solved all but for this one couldn’t find any solution until now.
knownuser is a class in another library includes a static method which I need to call it.
this is the error text from Code Sniffer:
enter image description here