php - Class not found with Composer autoload and PSR-0 -


i'm trying use psr-0 instead of classmap in composer having difficulty. appears json file correct yet class i'm trying access not being picked up. can please have , see if can spot i'm going wrong:

here have in composer.json:

"autoload": {     "psr-0": {         "martynbiz\\slim3controller\\": "src/"     } }, 

below 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 controller class:

<?php namespace martynbiz\slim3controller;  abstract class controller { 

also, can confirm composer autoload script has been included.

use psr-4 instead. psr-0 requires prefix included in document tree (i.e. src/martynbiz/slim3controller/controller.php).


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -