Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.7.0 #16586

Merged
merged 23 commits into from
May 17, 2024
Merged

5.7.0 #16586

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fdfc87f
Merge pull request #16564 from niden/T16532-column-corrections
niden Apr 5, 2024
9ac5dd7
enabling the mapper in the helper factory
niden Apr 29, 2024
735ce5c
updating changelog
niden Apr 29, 2024
ad6678e
Merge pull request #16574 from niden/T16571-helperfactory-mapper
niden Apr 29, 2024
7ff94ec
[#16567] - fix: changed \Phalcon\Forms\Form to set only existing prop…
noone-silent May 1, 2024
8c14b2e
[#16567] - fix: reset ini setting after test.
noone-silent May 1, 2024
e0dc3a7
Merge pull request #16575 from noone-silent/T16567-form-bind-entity-p…
niden May 1, 2024
8722b92
[#16577] - refactor: add @template for Model and add to @return in fi…
noone-silent May 2, 2024
e123c15
[#16577] - refactor: add @template for Model and add to @return in fi…
noone-silent May 3, 2024
0755759
[#16577] - refactor: add @template for Model and add to @return in fi…
noone-silent May 3, 2024
0c73a87
Merge pull request #16578 from noone-silent/T16577-enable-ide-autocom…
niden May 3, 2024
84ee128
fixing links
niden May 2, 2024
7b752ec
added tests for boolval and numbers
niden May 17, 2024
9ff268e
added conditions for numbers
niden May 17, 2024
f209030
updating changelog
niden May 17, 2024
92a111d
Merge pull request #16584 from niden/T16582-boolval-sanitize
niden May 17, 2024
e5f182f
refreshing ext
niden May 17, 2024
b4b99d6
prep for release
niden May 17, 2024
93c7690
Merge pull request #16585 from niden/5.0.x
niden May 17, 2024
4f24acc
Merge branch 'master' into 5.0.x
niden May 17, 2024
5cc8649
Bump versions of artifact actions to v4
Jeckerson May 17, 2024
989700b
Update main.yml
niden May 17, 2024
041897a
Merge pull request #16588 from phalcon/niden-patch-1
niden May 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[#16577] - refactor: add @template for Model and add to @return in fi…
…nd and findFirst
  • Loading branch information
noone-silent committed May 3, 2024
commit e123c15c6efc906a06db781202821987dc2e2365
4 changes: 2 additions & 2 deletions phalcon/Mvc/Model.zep
Original file line number Diff line number Diff line change
Expand Up @@ -1631,9 +1631,9 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface,
* ],
* 'hydration' => null
* ]
* @return T[]|\Phalcon\Mvc\Model\ResultsetInterface
* @return T[]|\Phalcon\Mvc\Model\Resultset<int, T>
*/
public static function find(var parameters = null) -> <ResultsetInterface>
public static function find(var parameters = null) -> <Resultset>
{
var params, query, resultset, hydration;

Expand Down
5 changes: 5 additions & 0 deletions phalcon/Mvc/Model/Resultset.zep
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ use Serializable;
* $robots->next();
* }
* ```
* @template TKey
* @template TValue
* @implements Iterator<TKey, TValue>
*/
abstract class Resultset
implements ResultsetInterface, Iterator, SeekableIterator, Countable, ArrayAccess, Serializable, JsonSerializable
Expand Down Expand Up @@ -468,6 +471,8 @@ abstract class Resultset

/**
* Gets pointer number of active row in the resultset
*
* @return TKey|null
*/
public function key() -> int | null
{
Expand Down
5 changes: 4 additions & 1 deletion phalcon/Mvc/Model/Resultset/Complex.zep
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ use stdClass;
*
* Complex resultsets may include complete objects and scalar values.
* This class builds every complex row as it is required
*
* @template TKey of int
* @template TValue of mixed
*/
class Complex extends Resultset implements ResultsetInterface
class Complex extends Resultset
{
/**
* @var array
Expand Down
4 changes: 4 additions & 0 deletions phalcon/Mvc/Model/Resultset/Simple.zep
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ use Phalcon\Storage\Serializer\SerializerInterface;
*
* Simple resultsets only contains a complete objects
* This class builds every complete object as it is required
*
* @template TKey of int
* @template TValue of \Phalcon\Mvc\ModelInterface
*/
class Simple extends Resultset
{
Expand Down Expand Up @@ -71,6 +74,7 @@ class Simple extends Resultset

/**
* Returns current row in the resultset
* @return TValue
*/
final public function current() -> <ModelInterface> | null
{
Expand Down
9 changes: 6 additions & 3 deletions phalcon/Mvc/ModelInterface.zep
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ use Phalcon\Di\DiInterface;
use Phalcon\Messages\MessageInterface;
use Phalcon\Mvc\Model\CriteriaInterface;
use Phalcon\Mvc\Model\MetaDataInterface;
use Phalcon\Mvc\Model\Resultset;
use Phalcon\Mvc\Model\ResultsetInterface;
use Phalcon\Mvc\Model\TransactionInterface;

/**
* Phalcon\Mvc\ModelInterface
*
* Interface for Phalcon\Mvc\Model
*
* @template T
*/
interface ModelInterface
{
Expand Down Expand Up @@ -102,15 +105,15 @@ interface ModelInterface
*
* @param array|string|int|null parameters
*
* @return ResultsetInterface
* @return T[]|\Phalcon\Mvc\Model\Resultset<int, T>
*/
public static function find(var parameters = null) -> <ResultsetInterface>;
public static function find(var parameters = null) -> <Resultset>;

/**
* Allows to query the first record that match the specified conditions
*
* @param array parameters
* @return \Phalcon\Mvc\ModelInterface|\Phalcon\Mvc\Model\Row|null
* @return T|\Phalcon\Mvc\ModelInterface|\Phalcon\Mvc\Model\Row|null
*
* TODO: Current method signature must be reviewed in v5. As it must return only ?ModelInterface (it also returns Row).
* @see https://github.com/phalcon/cphalcon/issues/15212
Expand Down
Loading