From 3cf0fd5ed2998b6190206a7d7f302cb776a6d3ba Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Sat, 14 Jan 2023 19:28:02 -0500 Subject: [PATCH] prep for 5.1.4 --- src/Acl/Adapter/Memory.php | 1 + src/Db/DialectInterface.php | 3 ++- src/Db/Enum.php | 2 ++ src/Db/Result/PdoResult.php | 5 ++--- src/Html/TagFactory.php | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Acl/Adapter/Memory.php b/src/Acl/Adapter/Memory.php index 97a2ae28..1379d130 100644 --- a/src/Acl/Adapter/Memory.php +++ b/src/Acl/Adapter/Memory.php @@ -17,6 +17,7 @@ use Phalcon\Acl\RoleAwareInterface; use Phalcon\Acl\ComponentAwareInterface; use Phalcon\Acl\ComponentInterface; +use ReflectionClass; use ReflectionFunction; /** diff --git a/src/Db/DialectInterface.php b/src/Db/DialectInterface.php index 3bf821df..6fd6746e 100644 --- a/src/Db/DialectInterface.php +++ b/src/Db/DialectInterface.php @@ -153,9 +153,10 @@ public function dropPrimaryKey(string $tableName, string $schemaName): string; * * @param string $tableName * @param string $schemaName + * @param bool $ifExists * @return string */ - public function dropTable(string $tableName, string $schemaName): string; + public function dropTable(string $tableName, string $schemaName, bool $ifExists = true): string; /** * Generates SQL to drop a view diff --git a/src/Db/Enum.php b/src/Db/Enum.php index 36664e94..79170bb1 100644 --- a/src/Db/Enum.php +++ b/src/Db/Enum.php @@ -42,6 +42,8 @@ class Enum const FETCH_OBJ = 5; + const FETCH_ORI_NEXT = 0; + const FETCH_PROPS_LATE = 1048576; const FETCH_SERIALIZE = 524288; diff --git a/src/Db/Result/PdoResult.php b/src/Db/Result/PdoResult.php index e1c3111e..9a66b0b9 100644 --- a/src/Db/Result/PdoResult.php +++ b/src/Db/Result/PdoResult.php @@ -9,7 +9,6 @@ */ namespace Phalcon\Db\Result; -use Pdo; use Phalcon\Db\Enum; use Phalcon\Db\ResultInterface; use Phalcon\Db\Adapter\AdapterInterface; @@ -144,7 +143,7 @@ public function execute(): bool * @param int $cursorOrientation * @param int $cursorOffset */ - public function fetch(int $fetchStyle = null, int $cursorOrientation = Pdo::FETCH_ORI_NEXT, int $cursorOffset = 0) + public function fetch(int $fetchStyle = null, int $cursorOrientation = Enum::FETCH_ORI_NEXT, int $cursorOffset = 0) { } @@ -166,7 +165,7 @@ public function fetch(int $fetchStyle = null, int $cursorOrientation = Pdo::FETC * @param array|null $constructorArgs * @return array */ - public function fetchAll(int $mode = Enum::FETCH_DEFAULT, $fetchArgument = Pdo::FETCH_ORI_NEXT, $constructorArgs = null): array + public function fetchAll(int $mode = Enum::FETCH_DEFAULT, $fetchArgument = Enum::FETCH_ORI_NEXT, $constructorArgs = null): array { } diff --git a/src/Html/TagFactory.php b/src/Html/TagFactory.php index cdb2748d..60a5e66f 100644 --- a/src/Html/TagFactory.php +++ b/src/Html/TagFactory.php @@ -9,8 +9,8 @@ */ namespace Phalcon\Html; -use Phalcon\Html\Escaper\EscaperInterface; use Phalcon\Factory\AbstractFactory; +use Phalcon\Html\Escaper\EscaperInterface; use Phalcon\Html\Helper\Doctype; use Phalcon\Html\Helper\Input\Checkbox; use Phalcon\Html\Helper\Input\Color;