mirror of
https://github.com/doctrine/collections.git
synced 2026-03-23 22:22:10 +01:00
Merge remote-tracking branch 'origin/2.5.x' into 3.0.x
This commit is contained in:
@@ -14,13 +14,12 @@
|
||||
"name": "2.5",
|
||||
"branchName": "2.5.x",
|
||||
"slug": "2.5",
|
||||
"upcoming": true
|
||||
"current": true
|
||||
},
|
||||
{
|
||||
"name": "2.4",
|
||||
"branchName": "2.4.x",
|
||||
"slug": "2.4",
|
||||
"current": true
|
||||
"maintained": false
|
||||
},
|
||||
{
|
||||
"name": "2.3",
|
||||
@@ -37,21 +36,11 @@
|
||||
"slug": "2.1",
|
||||
"maintained": false
|
||||
},
|
||||
{
|
||||
"name": "2.0",
|
||||
"slug": "2.0",
|
||||
"maintained": false
|
||||
},
|
||||
{
|
||||
"name": "1.8",
|
||||
"slug": "1.8",
|
||||
"maintained": false
|
||||
},
|
||||
{
|
||||
"name": "1.7",
|
||||
"slug": "1.7",
|
||||
"maintained": false
|
||||
},
|
||||
{
|
||||
"name": "1.6",
|
||||
"slug": "1.6",
|
||||
|
||||
@@ -73,6 +73,7 @@ Extending the following classes is deprecated and will no longer be possible in
|
||||
- `Doctrine\Common\Collections\Criteria`
|
||||
- `Doctrine\Common\Collections\Expr\ClosureExpressionVisitor`
|
||||
- `Doctrine\Common\Collections\Expr\Comparison`
|
||||
- `Doctrine\Common\Collections\Expr\CompositeExpression`
|
||||
- `Doctrine\Common\Collections\Expr\Value`
|
||||
- `Doctrine\Common\Collections\ExpressionBuilder`
|
||||
|
||||
|
||||
@@ -6,11 +6,6 @@ parameters:
|
||||
- src
|
||||
- tests/StaticAnalysis
|
||||
|
||||
ignoreErrors:
|
||||
-
|
||||
message: '~Parameter #1 \$key of method Doctrine\\Common\\Collections\\ArrayCollection<TKey of \(int\|string\),T>::set\(\) expects TKey of \(int\|string\), int\|string given\.~'
|
||||
path: 'src/ArrayCollection.php'
|
||||
|
||||
includes:
|
||||
- vendor/phpstan/phpstan-phpunit/extension.neon
|
||||
- vendor/phpstan/phpstan-phpunit/rules.neon
|
||||
|
||||
@@ -188,6 +188,7 @@ class ArrayCollection implements Collection, Selectable, Stringable
|
||||
return;
|
||||
}
|
||||
|
||||
/** @phpstan-var TKey $offset */
|
||||
$this->set($offset, $value);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ use function count;
|
||||
|
||||
/**
|
||||
* Expression of Expressions combined by AND or OR operation.
|
||||
*
|
||||
* @final since 2.5
|
||||
*/
|
||||
final readonly class CompositeExpression implements Expression
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ class CompositeExpressionTest extends TestCase
|
||||
protected function createCompositeExpression(): CompositeExpression
|
||||
{
|
||||
$type = CompositeExpression::TYPE_AND;
|
||||
$expressions = [$this->createMock(Expression::class)];
|
||||
$expressions = [$this->createStub(Expression::class)];
|
||||
|
||||
return new CompositeExpression($type, $expressions);
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class CompositeExpressionTest extends TestCase
|
||||
public function testGetExpressionList(): void
|
||||
{
|
||||
$compositeExpression = $this->createCompositeExpression();
|
||||
$expectedExpressionList = [$this->createMock(Expression::class)];
|
||||
$expectedExpressionList = [$this->createStub(Expression::class)];
|
||||
$actualExpressionList = $compositeExpression->getExpressionList();
|
||||
|
||||
self::assertEquals($expectedExpressionList, $actualExpressionList);
|
||||
|
||||
Reference in New Issue
Block a user