Merge remote-tracking branch 'origin/2.5.x' into 3.0.x

This commit is contained in:
Grégoire Paris
2026-01-12 21:56:40 +01:00
6 changed files with 8 additions and 20 deletions

View File

@@ -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",

View File

@@ -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`

View File

@@ -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

View File

@@ -188,6 +188,7 @@ class ArrayCollection implements Collection, Selectable, Stringable
return;
}
/** @phpstan-var TKey $offset */
$this->set($offset, $value);
}

View File

@@ -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
{

View File

@@ -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);