Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

[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.



1.7k

thank you. I compiled phalcon1.3.0. ```php 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


1.7k
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


1.7k

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