Hi Guys, I upgrade my php to PHP 7.2 with phalcon 3.3, someone could you help me with this warning? thanks
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.
|
May '18 |
3 |
221 |
0 |
In this document : https://github.com/phalcon/cphalcon/blob/master/phalcon/mvc/view.zep
I see on line 497 : "@deprecated Will be removed in 4.0.0" It's a documentation comment, about the getParams function
It's a warning that tells you "Watch it, in an upcoming version you code will break because the function will no longer exist"
Hi Stéphane, thanks for your reply, but, I replace for what? Do you know how to replace? thanks
In this document : https://github.com/phalcon/cphalcon/blob/master/phalcon/mvc/view.zep
I see on line 497 : "@deprecated Will be removed in 4.0.0" It's a documentation comment, about the getParams function
It's a warning that tells you "Watch it, in an upcoming version you code will break because the function will no longer exist"
Here : (https://olddocs.phalconphp.com/en/latest/api/Phalcon_Mvc_View.html) [https://olddocs.phalconphp.com/en/latest/api/Phalcon_Mvc_View.html] From the docs, they don't seem to do the same thing:
public getParamsToView ()
Returns parameters to views
Whereas:
public getParams ()
Gets extra parameters of the action rendered
The idea I would come with would be to use the dispatcher's getParams() result as a view's variable in the action:
$this->view->params = $this->dispatcher->getParams()