Cake 5.x App Directory? Is this a thing of the past?

So… If you want something built in Cakephp 2.x… I’m your huckleberry…But, alas, it is time to rewrite our stable Cakephp 2.x in the latest and greatest… I feel like an infant :roll_eyes:. I’ve got my environment installed and now I am starting using the “Quick Guide” but…Where the heck is the app directory??? lol. I have built my first model to extend Table, but I am getting this error:

Class “App\Model\Table\Table” not found

App is the src directory.

This bit in composer.json does the mapping:

    "autoload": {
        "psr-4": {
            "App\\": "src/"

With CakePHP 3 we changed from manually loading PHP files to composer autoloading via namespaces.

See if you don’t know what that is.

1 Like