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
f3340254
Unverified
Commit
f3340254
authored
Apr 27, 2020
by
Grégoire Paris
Committed by
GitHub
Apr 27, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3974 from greg0ire/remove-unneeded-and-risky-stubs-parsing
Remove unneeded and risky stubs parsing
parents
155d028b
c643ac38
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
Driver.php
lib/Doctrine/DBAL/Driver/OCI8/Driver.php
+2
-2
OCI8Connection.php
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
+1
-2
phpstan.neon.dist
phpstan.neon.dist
+5
-0
phpstan-polyfill.php
tests/phpstan-polyfill.php
+5
-8
No files found.
lib/Doctrine/DBAL/Driver/OCI8/Driver.php
View file @
f3340254
...
...
@@ -4,7 +4,7 @@ namespace Doctrine\DBAL\Driver\OCI8;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver\AbstractOracleDriver
;
use
const
OCI_
DEFAUL
T
;
use
const
OCI_
NO_AUTO_COMMI
T
;
/**
* A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.
...
...
@@ -22,7 +22,7 @@ class Driver extends AbstractOracleDriver
(
string
)
$password
,
$this
->
_constructDsn
(
$params
),
$params
[
'charset'
]
??
''
,
$params
[
'sessionMode'
]
??
OCI_
DEFAUL
T
,
$params
[
'sessionMode'
]
??
OCI_
NO_AUTO_COMMI
T
,
$params
[
'persistent'
]
??
false
);
}
catch
(
OCI8Exception
$e
)
{
...
...
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
View file @
f3340254
...
...
@@ -7,7 +7,6 @@ use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use
Doctrine\DBAL\ParameterType
;
use
UnexpectedValueException
;
use
const
OCI_COMMIT_ON_SUCCESS
;
use
const
OCI_DEFAULT
;
use
const
OCI_NO_AUTO_COMMIT
;
use
function
addcslashes
;
use
function
func_get_args
;
...
...
@@ -51,7 +50,7 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
$password
,
$db
,
$charset
=
''
,
$sessionMode
=
OCI_
DEFAUL
T
,
$sessionMode
=
OCI_
NO_AUTO_COMMI
T
,
$persistent
=
false
)
{
$dbh
=
$persistent
...
...
phpstan.neon.dist
View file @
f3340254
...
...
@@ -72,3 +72,8 @@ parameters:
-
message: '~^Cannot cast array<string>\|bool\|string\|null to int\.$~'
path: %currentWorkingDirectory%/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php
# Requires a release of https://github.com/JetBrains/phpstorm-stubs/pull/732
-
message: '~^Access to undefined constant PDO::PGSQL_ATTR_DISABLE_PREPARES\.$~'
path: %currentWorkingDirectory%/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
tests/phpstan-polyfill.php
View file @
f3340254
...
...
@@ -2,12 +2,9 @@
declare
(
strict_types
=
1
);
(
static
function
()
:
void
{
foreach
([
'ibm_db2'
,
'mysqli'
,
'oci8'
,
'sqlsrv'
,
'pgsql'
]
as
$extension
)
{
if
(
extension_loaded
(
$extension
))
{
continue
;
}
// PHPStan does not read global constants from the stubs yet, remove this when it does
if
(
defined
(
'OCI_NO_AUTO_COMMIT'
))
{
return
;
}
require
sprintf
(
__DIR__
.
'/../vendor/jetbrains/phpstorm-stubs/%1$s/%1$s.php'
,
$extension
);
}
})();
define
(
'OCI_NO_AUTO_COMMIT'
,
0
);
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