0

I just upgraded my cakephp 3.2 to cakephp 3.3 using

composer upgrade

Just after the upgrade when I F5 the page, I started getting the following error:

Error: Create the class PagesController below in file: src\Controller\PagesController.php

But the controller exists and all was working before the upgrade. I checked the routes and app files and everything seens nice.

All controllers have the same error.

Have anyone a clue of what is going on?

thx

EDIT - I FOUND THE SOLUTION - But dunno what happened. If someone explain me I will be grateful

The problem is at the file

vendor/composer/autoload_static.php

In my old file I had the following configuration.

Inside:

public static $prefixLengthsPsr4 = array

I had

'A' => 
        array (
            'Aura\\Intl\\_Config\\' => 18,
            'App\\' => 4,
        ),

And add the array

'App\\' => 
        array (
            0 => __DIR__ . '/../..' . '/src',
        ),

To

public static $prefixDirsPsr4 = array (

But in the new file updated by composer the APP configuration was gone. I manually added it and it worked!

Does someone knows why?

Jongware
  • 22,200
  • 8
  • 54
  • 100

0 Answers0