I'm trying to use PSR-0 instead of classmap in composer but having some difficulty. It appears that my json file is correct yet the class I'm trying to access is not being picked up. Can someone please have a look and see if they can spot where I'm going wrong:
Here is what I have in composer.json:
"autoload": {
"psr-0": {
"MartynBiz\\Slim3Controller\\": "src/"
}
},
Below is my folder structure:
$ tree .
.
|-- README.md
|-- composer.json
|-- composer.lock
|-- phpunit.xml
|-- src
| |-- Controller.php
| |-- Http
| | |-- Request.php
| | `-- Response.php
| `-- Test
| `-- PHPUnit
| `-- TestCase.php
`-- tests
|-- bootstrap.php
`-- library
`-- ControllerTest.php
Here is my Controller class:
<?php
namespace MartynBiz\Slim3Controller;
abstract class Controller
{
Also, I can confirm that composer autoload script has been included.
composer dump-autoload
as with classmap. – Martyn