Yii 2.0 error

Hi,i downloaded yi 2.0 rc and i get this error in both frontend and backend pages:

Fatal error: Using $this when not in object context in C:\Program Files (x86)\wamp\www\advanced\backend\views\site\index.php on line 4

and another question, how can i connect yi 2.0 to database. i guess it is different from yi 1.1 because i cant find any db area in main config file

Do you have PHP 5.4?

sure PHP Version is 5.4.16

DB connection is described in the guide. Not sure about why you have an error in advanced app template…

it was working ok in 2.0 beta versions but rc version gives this error. i changed error options in php.ini but no chance.

finally i got it, works now. but i still dont know why it gave this error. first i installed via extracting arhive, it gave error. then i installed via composer and it gaved error again. finally i updated composer and it worked.

thanks for replies.