Only numeric types are allowed in +/-

parent 0a57e8ed
...@@ -110,5 +110,11 @@ parameters: ...@@ -110,5 +110,11 @@ parameters:
paths: paths:
- %currentWorkingDirectory%/src/Schema/AbstractSchemaManager.php - %currentWorkingDirectory%/src/Schema/AbstractSchemaManager.php
- %currentWorkingDirectory%/src/Schema/Column.php - %currentWorkingDirectory%/src/Schema/Column.php
# https://github.com/phpstan/phpstan/issues/3146
-
message: '~^Only numeric types are allowed in -, int<1, max>\|false given on the left side\.~'
paths:
- %currentWorkingDirectory%/src/Platforms/SQLServer2012Platform.php
includes: includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon - vendor/phpstan/phpstan-strict-rules/rules.neon
...@@ -6,7 +6,6 @@ use Doctrine\DBAL\Platforms\DB2Platform; ...@@ -6,7 +6,6 @@ use Doctrine\DBAL\Platforms\DB2Platform;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use const CASE_LOWER; use const CASE_LOWER;
use function array_change_key_case; use function array_change_key_case;
use function is_resource;
use function preg_match; use function preg_match;
use function str_replace; use function str_replace;
use function strpos; use function strpos;
...@@ -201,11 +200,11 @@ class DB2SchemaManager extends AbstractSchemaManager ...@@ -201,11 +200,11 @@ class DB2SchemaManager extends AbstractSchemaManager
protected function _getPortableViewDefinition($view) protected function _getPortableViewDefinition($view)
{ {
$view = array_change_key_case($view, CASE_LOWER); $view = array_change_key_case($view, CASE_LOWER);
// sadly this still segfaults on PDO_IBM, see http://pecl.php.net/bugs/bug.php?id=17199
//$view['text'] = (is_resource($view['text']) ? stream_get_contents($view['text']) : $view['text']); $position = strpos($view['text'], ' AS ');
if (! is_resource($view['text'])) {
$pos = strpos($view['text'], ' AS '); if ($position !== false) {
$sql = substr($view['text'], $pos+4); $sql = substr($view['text'], $position + 4);
} else { } else {
$sql = ''; $sql = '';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment