We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Uncaught Error: Class 'Phalcon\Mvc\User\Component' not found

Uncaught Error: Class 'Phalcon\Mvc\User\Component' not found when am running my application.

Use \Phalcon\Di\Injectable instead. In v4 class Component was removed.



798

Hi Anton, the composer.json file has following php version. but am installed php 7.4.6 is there is any issue with our project .. or i want to downgrade the same in the composer.json??

"config": { "platform": { "php": "7.1.3" } }

Phalcon isn't installed via Composer, so this error doesn't depend on Composer, or your PHP version for that matter.

Are you running Phalcon version 3.4 or version 4?



798

am using 3.4.11 phalcon version, but am facing new issue which is js and css file directory not found. but application runs fine.

[Thu Jun 11 17:41:14 2020] PHP Notice: Undefined variable: popup in C:\Users\krish\OneDrive\Desktop\Backend\cache\volt\c__users_krish_onedrive_desktop_backend_application_core_views_session_login.volt.compiled on line 138 [Thu Jun 11 17:41:15 2020] PHP Warning: Phalcon\Assets\Manager::output(modules/core_session_login.css): failed to open stream: No such file or directory in C:\Users\krish\OneDrive\Desktop\Backend\cache\volt\c__users_krish_onedrive_desktop_backend_application_core_views_layouts_public.volt.compiled on line 62 [Thu Jun 11 17:41:15 2020] ::1:61035 [404]: /assets/js/core/libraries/jquery.min.js - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61038 [404]: /assets/js/core/libraries/bootstrap.min.js - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61039 [404]: /assets/js/plugins/forms/styling/uniform.min.js - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61040 [404]: /assets/js/plugins/forms/selects/bootstrap_multiselect.js - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61041 [404]: /assets/js/plugins/notifications/pnotify.min.js - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61042 [404]: /assets/css/icons/icomoon/styles.css - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61044 [404]: /assets/css/bootstrap.css - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61045 [404]: /assets/css/core.css - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61046 [404]: /assets/css/components.css - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61047 [404]: /assets/css/colors.css - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61049 [404]: /assets/css/custom.css - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61050 [404]: /assets/css/font-awesome.css - No such file or directory [Thu Jun 11 17:41:15 2020] ::1:61051 [404]: /assets/css/flexslider.css - No such file or directory [Thu Jun 11 17:41:16 2020] ::1:61052 [404]: /assets/css/demo1/pages/login/login-v2.css - No such file or directory [Thu Jun 11 17:41:16 2020] ::1:61053 [404]: /assets/css/demo1/style.bundle.css - No such file or directory [Thu Jun 11 17:41:16 2020] ::1:61054 [404]: /assets/css/demo1/skins/header/base/light.css - No such file or directory [Thu Jun 11 17:41:16 2020] ::1:61055 [404]: /assets/css/demo1/skins/header/menu/light.css - No such file or directory [Thu Jun 11 17:41:16 2020] ::1:61056 [404]: /assets/css/demo1/skins/brand/navy.css - No such file or directory [Thu Jun 11 17:41:16 2020] ::1:61057 [404]: /assets/css/demo1/skins/aside/navy.css - No such file or directory [Thu Jun 11 17:41:16 2020] ::1:61058 [404]: /modules/core_session_login.css - No such file or directory [Thu Jun 11 17:41:21 2020] ::1:61060 [404]: /assets/js/plugins/forms/validation/validate.min.js - No such file or directory [Thu Jun 11 17:41:21 2020] ::1:61061 [404]: /assets/js/bootstrap-tabcollapse.js - No such file or directory [Thu Jun 11 17:41:21 2020] ::1:61062 [404]: /assets/js/jquery.flexslider.js - No such file or directory [Thu Jun 11 17:41:22 2020] ::1:61072 [404]: /assets/css/icons/icomoon/styles.css - No such file or directory [Thu Jun 11 17:41:23 2020] ::1:61073 [404]: /assets/css/core.css - No such file or directory

If that's a new problem feel free to start a new thread.

Also, if you're posting error output like that, please surround it with three backticks so it's more easily readable.