Skip to content

Commit d56f10d

Browse files
authored
Merge pull request #543 from doctrine/2.0.x-merge-up-into-2.1.x_c6vJpgoH
Merge release 2.0.3 into 2.1.x
2 parents be489ac + f65b353 commit d56f10d

File tree

11 files changed

+190
-86
lines changed

11 files changed

+190
-86
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
time: "11:00"
8+
open-pull-requests-limit: 10
9+
labels:
10+
- "Dependencies"
11+
versioning-strategy: "increase-if-necessary"
12+
target-branch: "1.8.x"
313
- package-ecosystem: "github-actions"
414
directory: "/"
515
schedule:

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ on:
1111
jobs:
1212
coding-standards:
1313
name: "Coding Standards"
14-
uses: "doctrine/.github/.github/workflows/coding-standards.yml@6.0.0"
14+
uses: "doctrine/.github/.github/workflows/coding-standards.yml@7.3.0"

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- "8.1"
2929
- "8.2"
3030
- "8.3"
31+
- "8.4"
3132
dependencies:
3233
- "highest"
3334
stability:
@@ -36,9 +37,6 @@ jobs:
3637
- php-version: "8.1"
3738
dependencies: "lowest"
3839
stability: "stable"
39-
- php-version: "8.3"
40-
dependencies: "highest"
41-
stability: "dev"
4240

4341
steps:
4442
- name: "Checkout"

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ on:
1717
jobs:
1818
documentation:
1919
name: "Documentation"
20-
uses: "doctrine/.github/.github/workflows/documentation.yml@6.0.0"
20+
uses: "doctrine/.github/.github/workflows/documentation.yml@7.3.0"

.github/workflows/release-on-milestone-closed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
release:
1010
name: "Git tag, release & create merge-up PR"
11-
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@6.0.0"
11+
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@7.3.0"
1212
secrets:
1313
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
1414
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ on:
1111
jobs:
1212
static-analysis:
1313
name: "Static Analysis"
14-
uses: "doctrine/.github/.github/workflows/phpstan.yml@6.0.0"
14+
uses: "doctrine/.github/.github/workflows/phpstan.yml@7.3.0"

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
},
2626
"require-dev": {
2727
"ext-sqlite3": "*",
28-
"doctrine/coding-standard": "^12",
28+
"doctrine/coding-standard": "^13",
2929
"doctrine/dbal": "^3.5 || ^4",
3030
"doctrine/mongodb-odm": "^1.3.0 || ^2.0.0",
3131
"doctrine/orm": "^2.14 || ^3",
3232
"fig/log-test": "^1",
33-
"phpstan/phpstan": "^1.10",
34-
"phpunit/phpunit": "^10.5.3",
33+
"phpstan/phpstan": "2.1.17",
34+
"phpunit/phpunit": "10.5.45",
3535
"symfony/cache": "^6.4 || ^7",
3636
"symfony/var-exporter": "^6.4 || ^7"
3737
},

phpstan-baseline.neon

Lines changed: 144 additions & 70 deletions
Large diffs are not rendered by default.

src/Purger/ORMPurger.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use function array_map;
1515
use function array_reverse;
16-
use function assert;
1716
use function count;
1817
use function in_array;
1918

@@ -187,8 +186,7 @@ private function getCommitOrder(EntityManagerInterface $em, array $classes): arr
187186
continue;
188187
}
189188

190-
$targetClass = $em->getClassMetadata($assoc['targetEntity']);
191-
assert($targetClass instanceof ClassMetadata);
189+
$targetClass = $em->getClassMetadata($assoc['targetEntity']);
192190
$targetClassName = $targetClass->getName();
193191

194192
if (! $sorter->hasNode($targetClassName)) {

src/ReferenceRepository.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
use function array_key_exists;
1414
use function array_keys;
15+
use function array_map;
1516
use function sprintf;
1617

1718
/**
@@ -25,7 +26,7 @@ class ReferenceRepository
2526
* List of named references to the fixture objects
2627
* gathered during fixure loading
2728
*
28-
* @phpstan-var array<class-string, array<string, object>>
29+
* @phpstan-var array<class-string, array<string|int, object>>
2930
*/
3031
private array $referencesByClass = [];
3132

@@ -192,7 +193,7 @@ public function getReferenceNames(object $reference): array
192193
return [];
193194
}
194195

195-
return array_keys($this->referencesByClass[$class], $reference, true);
196+
return array_map('strval', array_keys($this->referencesByClass[$class], $reference, true));
196197
}
197198

198199
/**
@@ -218,7 +219,7 @@ public function getIdentitiesByClass(): array
218219
/**
219220
* Get all stored references
220221
*
221-
* @phpstan-return array<class-string, array<string, object>>
222+
* @phpstan-return array<class-string, array<string|int, object>>
222223
*/
223224
public function getReferencesByClass(): array
224225
{
@@ -237,6 +238,8 @@ public function getManager(): ObjectManager
237238
* Get real class name of a reference that could be a proxy
238239
*
239240
* @param string $className Class name of reference object
241+
*
242+
* @return class-string
240243
*/
241244
protected function getRealClass(string $className): string
242245
{

0 commit comments

Comments
 (0)