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
292d819d
Unverified
Commit
292d819d
authored
Aug 03, 2019
by
Marco Pivetta
Committed by
GitHub
Aug 03, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3642 from morozov/notice-for-non-valid-array-container
Fixed test failures on PHP 7.4
parents
bf9d55cd
860b90b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
MySqlSchemaManager.php
lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
+7
-0
Table.php
lib/Doctrine/DBAL/Schema/Table.php
+4
-2
OCI8StatementTest.php
tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php
+5
-0
PoolingShardManagerTest.php
.../Doctrine/Tests/DBAL/Sharding/PoolingShardManagerTest.php
+4
-0
No files found.
lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
View file @
292d819d
...
...
@@ -309,13 +309,20 @@ class MySqlSchemaManager extends AbstractSchemaManager
$tableOptions
=
$this
->
_conn
->
fetchAssoc
(
$sql
);
if
(
$tableOptions
===
false
)
{
return
$table
;
}
$table
->
addOption
(
'engine'
,
$tableOptions
[
'ENGINE'
]);
if
(
$tableOptions
[
'TABLE_COLLATION'
]
!==
null
)
{
$table
->
addOption
(
'collation'
,
$tableOptions
[
'TABLE_COLLATION'
]);
}
if
(
$tableOptions
[
'AUTO_INCREMENT'
]
!==
null
)
{
$table
->
addOption
(
'autoincrement'
,
$tableOptions
[
'AUTO_INCREMENT'
]);
}
$table
->
addOption
(
'comment'
,
$tableOptions
[
'TABLE_COMMENT'
]);
$table
->
addOption
(
'create_options'
,
$this
->
parseCreateOptions
(
$tableOptions
[
'CREATE_OPTIONS'
]));
...
...
lib/Doctrine/DBAL/Schema/Table.php
View file @
292d819d
...
...
@@ -34,7 +34,9 @@ class Table extends AbstractAsset
protected
$_fkConstraints
=
[];
/** @var mixed[] */
protected
$_options
=
[];
protected
$_options
=
[
'create_options'
=>
[],
];
/** @var SchemaConfig|null */
protected
$_schemaConfig
=
null
;
...
...
@@ -69,7 +71,7 @@ class Table extends AbstractAsset
$this
->
_addForeignKeyConstraint
(
$constraint
);
}
$this
->
_options
=
$options
;
$this
->
_options
=
array_merge
(
$this
->
_options
,
$options
)
;
}
/**
...
...
tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php
View file @
292d819d
...
...
@@ -59,6 +59,11 @@ class OCI8StatementTest extends DbalTestCase
$this
->
equalTo
(
$params
[
2
])
);
// the return value is irrelevant to the test
// but it has to be compatible with the method signature
$statement
->
method
(
'errorInfo'
)
->
willReturn
(
false
);
// can't pass to constructor since we don't have a real database handle,
// but execute must check the connection for the executeMode
$conn
=
$this
->
getMockBuilder
(
OCI8Connection
::
class
)
...
...
tests/Doctrine/Tests/DBAL/Sharding/PoolingShardManagerTest.php
View file @
292d819d
...
...
@@ -47,6 +47,10 @@ class PoolingShardManagerTest extends TestCase
{
$conn
=
$this
->
createConnectionMock
();
$conn
->
expects
(
$this
->
once
())
->
method
(
'connect'
)
->
with
(
$this
->
equalTo
(
0
));
$conn
->
method
(
'getParams'
)
->
willReturn
([
'shardChoser'
=>
$this
->
createMock
(
ShardChoser
::
class
),
]);
$shardManager
=
new
PoolingShardManager
(
$conn
);
$shardManager
->
selectGlobal
();
...
...
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