A
A
Alexey Babiev2017-07-22 09:19:42
PHP
Alexey Babiev, 2017-07-22 09:19:42

How to make NetBeans respect namespaces from autoload composer?

In Netbins, I include hints for PSR-0, and in composer.json I write:

"autoload": {
        "psr-0": {
            "Monolit\\Core\\": "core"
        }
    }

In the file core/Facade/Route.php
namespace Monolit\Core\Facade;

class Route {
    //Class body
}

Netbins points to a PSR-0 violation. They say the namespace does not match the file hierarchy (should be namespace core\Facade;). That is, netbins does not take into account what is specified in the composer. How to overcome? Or is it easier to disable hints that are convenient for me?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ildar Gafarov, 2017-07-26
@badprogrammist

I haven't used NetBeans for a long time and I don't have an installed version at hand. I worked with Java platform. Typically, as I recall, NetBeans did not maintain application context at such a deep level. Maybe the following guesses will help you:
1) You may need to install a plugin for composer
2) Look carefully at the project settings
3) Maybe you will find a solution here https://stackoverflow.com/questions/26955523/how-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question