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
30ca3a42
Commit
30ca3a42
authored
Jul 16, 2015
by
Valentinas Bartusevičius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/v-bartusevicius/dbal
into DateIntervalType
parents
6c319742
eae7b0d8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
7 deletions
+12
-7
.gitignore
.gitignore
+0
-1
Connection.php
lib/Doctrine/DBAL/Connection.php
+4
-3
Console
lib/vendor/Symfony/Component/Console
+0
-1
doctrine-build-common
lib/vendor/doctrine-build-common
+0
-1
doctrine-common
lib/vendor/doctrine-common
+0
-1
ConnectionTest.php
tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php
+8
-0
No files found.
.gitignore
View file @
30ca3a42
...
...
@@ -3,7 +3,6 @@ logs/
reports/
dist/
download/
lib/Doctrine/Common/
vendor/
*.phpunit.xml
composer.lock
\ No newline at end of file
lib/Doctrine/DBAL/Connection.php
View file @
30ca3a42
...
...
@@ -1093,7 +1093,7 @@ class Connection implements DriverConnection
*
* @param \Closure $func The function to execute transactionally.
*
* @return
void
* @return
mixed The value returned by $func
*
* @throws \Exception
*/
...
...
@@ -1101,8 +1101,9 @@ class Connection implements DriverConnection
{
$this
->
beginTransaction
();
try
{
$func
(
$this
);
$
res
=
$
func
(
$this
);
$this
->
commit
();
return
$res
;
}
catch
(
Exception
$e
)
{
$this
->
rollBack
();
throw
$e
;
...
...
@@ -1590,7 +1591,7 @@ class Connection implements DriverConnection
}
try
{
$this
->
query
(
$this
->
platform
->
getDummySelectSQL
());
$this
->
query
(
$this
->
getDatabasePlatform
()
->
getDummySelectSQL
());
return
true
;
}
catch
(
DBALException
$e
)
{
...
...
Console
@
4200b4bc
Subproject commit 4200b4bc95ae3c1b03d943cd875277e35a17898a
doctrine-build-common
@
efa94de2
Subproject commit efa94de25beef4aefaeb7972c122798f9876fc39
doctrine-common
@
d1c7d433
Subproject commit d1c7d4334e38cad603a5c863d4c7b91bb04ec6b2
tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php
View file @
30ca3a42
...
...
@@ -209,6 +209,14 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
});
}
public
function
testTransactionalReturnValue
()
{
$res
=
$this
->
_conn
->
transactional
(
function
(
$conn
)
{
return
42
;
});
$this
->
assertEquals
(
42
,
$res
);
}
/**
* Tests that the quote function accepts DBAL and PDO types.
*/
...
...
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