Correct way to work with composer in php

2

Hello, I really like php and for some time I'm using the MVC concept in my application, however without using the composer and its autoloader. In order to raise my knowledge, I installed the same and got to use third party applications using the dependencies.

The question is: where does MY application stay?

I've read that you need to add the following code in my composer.json

    "autoload": {
       "psr-4": {"MeuProjeto\": "src/"}
    }

But it still does not work, I used the commands:

  

composer update | dump-autoload composer

And it did not work, what would be the problem? the error it gives is this:

  

Fatal error: Class 'Init' not found in C: \ inetpub \ Study \ public \ index.php on line 33

But using the applications included in the project dependencies (inside the vendor folder) there is no such error Thank you

    
asked by anonymous 11.01.2018 / 07:34

0 answers