Skip to content

Commit

Permalink
Merge 4.x into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored Jun 20, 2024
2 parents 1eaccb7 + d7a4fb3 commit 288c889
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
extensions: mongodb

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
extensions: mongodb

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand All @@ -60,7 +60,7 @@ jobs:
extensions: mongodb

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand All @@ -85,7 +85,7 @@ jobs:
extensions: mongodb

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/symfony-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
tools: composer:v2

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand All @@ -58,7 +58,7 @@ jobs:
tools: composer:v2

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand All @@ -82,7 +82,7 @@ jobs:
tools: composer:v2

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand All @@ -106,7 +106,7 @@ jobs:
tools: composer:v2

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ jobs:
run: composer require ${{ matrix.variant }} --no-update

- name: Install Composer dependencies (${{ matrix.dependencies }})
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}

- name: Run Tests with coverage
run: make coverage

- name: Send coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: build/logs/clover.xml
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"phpunit/phpunit": "^9.6",
"psalm/plugin-phpunit": "^0.18",
"psalm/plugin-symfony": "^5.0",
"rector/rector": "^0.19",
"rector/rector": "^1.1",
"sonata-project/block-bundle": "^4.2 || ^5.0",
"symfony/browser-kit": "^5.4 || ^6.2 || ^7.0",
"symfony/css-selector": "^5.4 || ^6.2 || ^7.0",
Expand Down
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<issueHandlers>
<MissingClassConstType errorLevel="suppress"/>
</issueHandlers>
</psalm>
2 changes: 1 addition & 1 deletion src/Model/ModelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function getIdentifierValues(object $model): array

public function getIdentifierFieldNames(string $class): array
{
return array_filter($this->getMetadata($class)->getIdentifier());
return array_filter($this->getMetadata($class)->getIdentifier(), static fn (?string $id) => null !== $id);
}

public function getNormalizedIdentifier(object $model): ?string
Expand Down
6 changes: 4 additions & 2 deletions tests/Model/ModelManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,10 @@ public function testFailingBatchDelete(string $expectedExceptionMessage, array $
Configuration::AUTOGENERATE_FILE_NOT_EXISTS
);
$uow = new UnitOfWork($dm, $eventManager, $hydratorFactory);
/** @psalm-suppress InternalMethod */
$hydratorFactory->setUnitOfWork($uow);
// @phpstan-ignore-next-line
if (method_exists($hydratorFactory, 'setUnitOfWork')) {
$hydratorFactory->setUnitOfWork($uow);
}

$dm
->expects(static::atLeastOnce())
Expand Down

0 comments on commit 288c889

Please sign in to comment.