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
ed4ac2af
Unverified
Commit
ed4ac2af
authored
Jan 30, 2020
by
Sergei Morozov
Committed by
GitHub
Jan 30, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3865 from BenMorel/remove-andx
Remove ExpressionBuilder::andX()/orX()
parents
f076cc75
e99812ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
52 deletions
+4
-52
UPGRADE.md
UPGRADE.md
+4
-0
ExpressionBuilder.php
lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php
+0
-20
ExpressionBuilderTest.php
...ine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php
+0
-32
No files found.
UPGRADE.md
View file @
ed4ac2af
# Upgrade to 4.0
## BC BREAK: Removed `ExpressionBuilder` methods
The
`andX()`
and
`orX()`
methods of the
`ExpressionBuilder`
class have been removed. Use
`and()`
and
`or()`
instead.
## BC BREAK: Removed `CompositeExpression` methods
The
`add()`
and
`addMultiple()`
methods of the
`CompositeExpression`
class have been removed. Use
`with()`
instead, which returns a new instance.
...
...
lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php
View file @
ed4ac2af
...
...
@@ -60,26 +60,6 @@ class ExpressionBuilder
return
new
CompositeExpression
(
CompositeExpression
::
TYPE_OR
,
array_merge
([
$expression
],
$expressions
));
}
/**
* @deprecated Use `and()` instead.
*
* @param string|CompositeExpression ...$expressions Requires at least one defined when converting to string.
*/
public
function
andX
(
...
$expressions
)
:
CompositeExpression
{
return
new
CompositeExpression
(
CompositeExpression
::
TYPE_AND
,
$expressions
);
}
/**
* @deprecated Use `or()` instead.
*
* @param string|CompositeExpression ...$expressions Requires at least one defined when converting to string.
*/
public
function
orX
(
...
$expressions
)
:
CompositeExpression
{
return
new
CompositeExpression
(
CompositeExpression
::
TYPE_OR
,
$expressions
);
}
/**
* Creates a comparison expression.
*
...
...
tests/Doctrine/Tests/DBAL/Query/Expression/ExpressionBuilderTest.php
View file @
ed4ac2af
...
...
@@ -40,22 +40,6 @@ class ExpressionBuilderTest extends DbalTestCase
self
::
assertEquals
(
$expected
,
(
string
)
$composite
);
}
/**
* @param string[]|CompositeExpression[] $parts
*
* @dataProvider provideDataForAnd
*/
public
function
testAndX
(
array
$parts
,
string
$expected
)
:
void
{
$composite
=
$this
->
expr
->
andX
();
foreach
(
$parts
as
$part
)
{
$composite
=
$composite
->
with
(
$part
);
}
self
::
assertEquals
(
$expected
,
(
string
)
$composite
);
}
/**
* @return mixed[][]
*/
...
...
@@ -113,22 +97,6 @@ class ExpressionBuilderTest extends DbalTestCase
self
::
assertEquals
(
$expected
,
(
string
)
$composite
);
}
/**
* @param string[]|CompositeExpression[] $parts
*
* @dataProvider provideDataForOr
*/
public
function
testOrX
(
array
$parts
,
string
$expected
)
:
void
{
$composite
=
$this
->
expr
->
orX
();
foreach
(
$parts
as
$part
)
{
$composite
=
$composite
->
with
(
$part
);
}
self
::
assertEquals
(
$expected
,
(
string
)
$composite
);
}
/**
* @return mixed[][]
*/
...
...
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