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

Class 'MetaDataAdapter' not found

( ! ) Fatal error: Class 'MetaDataAdapter' not found in D:\wamp\www\phalcon\app\config\services.php on line 75

who can tell me the reason for it ? I will very thank you



58.4k

Hey

Could you to upload your file services.php?

There is no class named "MetaDataAdapter" in phalcon, maybe it is just an alias of class "\Phalcon\Mvc\Model\MetaData" or its sub-classes.

yes , the services.php in path " app/config " ,my project is build by command line, I do nothing for it , but when I instant model , It throws exception

Hey

Could you to upload your file services.php?

As @顾伟刚 said, there is no MetaDataAdapter class.

Try placing this line at the beginning of your services.php:

use Phalcon\Mvc\Model\MetaData as MetaDataAdapter;

tank you! I try do it as you said , but it throw errors " Fatal error: Cannot instantiate abstract class Phalcon\Mvc\Model\MetaData in D:\wamp\www\phalcon\app\config\services.php on line 77 "

As @顾伟刚 said, there is no MetaDataAdapter class.

Try placing this line at the beginning of your services.php:

use Phalcon\Mvc\Model\MetaData as MetaDataAdapter;


640
Accepted
answer

in my services.php, there's one line as following:

use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;

maybe no that in yours.

yes , Thank you very much , I do it as you said , It success !!!

in my services.php, there's one line as following:

use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;

maybe no that in yours.