Fatal error: Uncaught Error: Class "PhalconConfig" not found in Phalcon Php application
I installed Phalcon PHP version 5.0.0beta3 in my Ubuntu, because it's compatible with PHP 8.0, but when I run my application some Phalcon classes are not found, I already installed the psr module using the following command:
sudo apt install php8.0-psr
and I have installed phalcon.so by direct download from phalcon php github releases, so when I access my phpinfo() I can see it there:
evidence of phalcon.so instalation
any idea what's going on?
Answer
Solution:
Phalcon 5 has a number of backwards incompatible changes. Most prominent is all the classes in the base Phalcon namespace were moved to more accurate locations.
- Phalcon\Config -> Phalcon\Config\Config
- Phalcon\Di -> Phalcon\Di\Di
Etc
Check the release notes at https://github.com/phalcon/cphalcon/blob/master/CHANGELOG-5.0.md for specific changes.
Source