From 762d930d7805862591723b51b26f62c3c33cb2b3 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 18 Jul 2023 22:12:05 -0400 Subject: [PATCH 1/2] added return type for getVar() in View --- phalcon/Mvc/View.zep | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phalcon/Mvc/View.zep b/phalcon/Mvc/View.zep index 109a40c958d..ca633b81e04 100644 --- a/phalcon/Mvc/View.zep +++ b/phalcon/Mvc/View.zep @@ -536,8 +536,10 @@ class View extends Injectable implements ViewInterface, EventsAwareInterface /** * Returns a parameter previously set in the view + * + * @return mixed|null */ - public function getVar(string! key) + public function getVar(string! key) -> var | null { var value; From a8e4047fbc7d4e4194effa4da294f574fd0860f2 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Wed, 19 Jul 2023 09:28:39 -0400 Subject: [PATCH 2/2] updating changelog --- CHANGELOG-5.0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-5.0.md b/CHANGELOG-5.0.md index 72b7edb9549..fb671d31f89 100644 --- a/CHANGELOG-5.0.md +++ b/CHANGELOG-5.0.md @@ -5,8 +5,10 @@ ### Fixed - Tried to reproduce the behavior described in #16244 but had no success. [#16244](https://github.com/phalcon/cphalcon/issues/16244) - Added `getAdapter()` in `Phalcon\Mvc\Model\Metadata` to retrieve the internal cache adapter if necessary. [#16244](https://github.com/phalcon/cphalcon/issues/16244) -- Added `Phalcon\Storage\Adapter\Weak` implemented with WeakReference has a cache/retrieval solution for objects not yet collected by the Garbage Collection. [#16372] (https://github.com/phalcon/cphalcon/issues/16372) +- Added `Phalcon\Storage\Adapter\Weak` implemented with WeakReference has a cache/retrieval solution for objects not yet collected by the Garbage Collection. [#16372](https://github.com/phalcon/cphalcon/issues/16372) - Extended `Phalcon\Di\Injectable` from `stdClass` to remove the deprecation warning (dynamic properties) for PHP 8.2 [#16308](https://github.com/phalcon/cphalcon/issues/16308) +- Corrected the return type of `Phalcon\Mvc\View::getVar()` so that stubs can be accurate. [#16276](https://github.com/phalcon/cphalcon/issues/16276) + ## [5.2.2](https://github.com/phalcon/cphalcon/releases/tag/v5.2.2) (2023-06-18)