You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff --git a/lib/internal/Magento/Framework/DB/Select.php b/lib/internal/Magento/Framework/DB/Select.php
index 075aa6b24faa..4f79b0d314f1 100644
--- a/lib/internal/Magento/Framework/DB/Select.php+++ b/lib/internal/Magento/Framework/DB/Select.php@@ -7,6 +7,7 @@
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\DB\Adapter\AdapterInterface;
+use Magento\Framework\DB\Sql\Expression;
/**
* Class for SQL SELECT generation and results.
@@ -107,19 +108,19 @@ public function __construct(
* </code>
*
* @param string $cond The WHERE condition.
- * @param string|array|null $value OPTIONAL An optional single or array value to quote into the condition.- * @param string|int|null $type OPTIONAL The type of the given value- * @return \Magento\Framework\DB\Select+ * @param array|null|int|string|float|Expression|Select|\DateTimeInterface $value The value to quote.+ * @param int|string|null $type OPTIONAL SQL datatype of the given value e.g. Zend_Db::FLOAT_TYPE or "INT"+ * @return Select
*/
public function where($cond, $value = null, $type = null)
{
if ($value === null && $type === null) {
$value = '';
- } elseif ($type == self::TYPE_CONDITION) {+ } elseif ((string)$type === self::TYPE_CONDITION) {
$type = null;
}
if (is_array($value)) {
- $cond = $this->getConnection()->quoteInto($cond, $value);+ $cond = $this->getConnection()->quoteInto($cond, $value, $type);
$value = null;
}
return parent::where($cond, $value, $type);
Test complaining that return type has changed, but it actually not, as class Magento\Framework\DB\Select actually is THE SAME class as Select as it in the current namespace.
I've seen few times when SVC check was complaining about changed return type, when actually it wasn't.
Example taken from magento/magento2#27980 here https://github.com/magento/magento2/pull/27980/files#diff-fe16896d208c3ab2d52fccbbf7a5eaebR113:
Actual result
Result is following:

Expected result
Return type isn't changed.
Test complaining that return type has changed, but it actually not, as class
Magento\Framework\DB\Select
actually is THE SAME class asSelect
as it in the current namespace.Additional examples:
magento/magento2#27129
magento/magento2#26355 (comment)
The text was updated successfully, but these errors were encountered: