I have created a composer library.
I have one folder:
Models
Inside that is 1 file, it has a namespace declared TestJames
In my composer.json file I have:
"autoload": {
"psr-0": { "TestJames": "Models/" }
}
Firstly, I have no idea what the psr-0 bit means. Secondly, I am unsure of the order of bits and bobs.
Is there a documentation specifically for this part, and what am I doing wrong?
PSR-0 is a standard for autoloading, but it's deprecated (if you can, use PSR-4). See more in here.
For doc about composer autoload look here
Has you executed "composer update"? It creates your vendor directory and you autoload.php file.
Also important is that you require vendor/autoload.php in your execution flow before you try to acces to this class.