Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A non-empty PSR-4 prefix must end with a namespace separator

I'm trying to setup PSR-4 with Composer but I'm just getting A non-empty PSR-4 prefix must end with a namespace separator.

My autoload in my composer.json looks like this:

"autoload": {     "psr-4": {         "Acme\\models" : "app/models"     } }, 

app/models is empty.

What am I doing wrong? How can I fix this?

like image 489
Marwelln Avatar asked Jan 30 '14 17:01

Marwelln


1 Answers

Someone made a comment but removed it. He mentioned I was missing \\ at the end of Acme\\models. Acme\\models\\ will get rid of the message and work as it should.

like image 115
Marwelln Avatar answered Oct 09 '22 21:10

Marwelln