Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
559c6bae
Unverified
Commit
559c6bae
authored
Apr 03, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only numeric types are allowed in +/-
parent
0a57e8ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
phpstan.neon.dist
phpstan.neon.dist
+6
-0
DB2SchemaManager.php
src/Schema/DB2SchemaManager.php
+5
-6
No files found.
phpstan.neon.dist
View file @
559c6bae
...
@@ -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
src/Schema/DB2SchemaManager.php
View file @
559c6bae
...
@@ -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'
],
$pos
ition
+
4
);
}
else
{
}
else
{
$sql
=
''
;
$sql
=
''
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment