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

[SOLVED]AnnotationAdapter getProperty error

hello.thanks for great framework.

I got an error, when I called annotations getPropety method.

$annotations = new \Phalcon\Annotations\Adapter\Memory();
//It is work
$result = $annotations->getMethods('ClassName');
//It is work
$result = $annotations->getMethod('ClassName', 'methodName');
//It is work
$result = $annotations->getProperties('ClassName');
//It is not work
$result = $annotations->getProperty('ClassName', 'propertyName');

the error message is

Fatal error: Phalcon\Annotations\Adapter::getProperty(): Call to undefined method getpropertyannotations() on class Phalcon\Annotations\Reflection

Is this a bug?

I use phalcon1.2.2 and php5.5.1. thank you.



2.9k

thank you. I compiled phalcon1.3.0.

git checkout 1.3.0
cd build/
./install 

but an error is continue.

'getpropertyannotations' still exists in phalcon.c It may be the reason.

How to install?

Please build Phalcon from ext/, not from build/

cd ext
phpize
./configure
make
sudo make install


2.9k
edited Oct '14

thank you very much. compile was success.

but other problem occurred.

phalcon 1.3.0

Fatal error: Phalcon\Dispatcher::dispatch(): Call to method fire() on a non object 

phalcon1.2.2

PHP Fatal error:  Declaration of Phalcon\Mvc\Model::getMessages() must be compatible with Phalcon\Mvc\ModelInterface::getMessages($filter = NULL) in Unknown on line 0

Can you tell me how to solve the problem?

What git revision is for 1.3.0? Should be c800012cfe43afd87d91fe1745a942578b7e3c22

git clone https://github.com/phalcon/cphalcon.git
cd cphalcon
git checkout 1.3.0
cd ext
phpize
./configure
make
sudo make install


2.9k

Sorry, It`s my mistake. phalcon1.3.0 successfully installed and annotation adapter getProperty works fine. thank you very much.