From 6d2b810f91781e952bcc95dcc2b1968410656fcd Mon Sep 17 00:00:00 2001 From: Michiel Vermeersch Date: Fri, 29 Nov 2024 11:56:32 +0100 Subject: [PATCH 1/4] Use PSR Logger instead of Closure in LoadDataFixturesDoctrineODMCommand (#865) --- composer.json | 4 ++-- src/Command/LoadDataFixturesDoctrineODMCommand.php | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 929c2ab0..9f85cdd7 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ }, "require-dev": { "doctrine/coding-standard": "^11.0", - "doctrine/data-fixtures": "^1.7", + "doctrine/data-fixtures": "^1.8 || ^2.0", "phpunit/phpunit": "^9.5.5", "psalm/plugin-symfony": "^5.0", "symfony/browser-kit": "^6.4 || ^7.0", @@ -53,7 +53,7 @@ "vimeo/psalm": "^5.25" }, "conflict": { - "doctrine/data-fixtures": "<1.3" + "doctrine/data-fixtures": "<1.8" }, "suggest": { "doctrine/data-fixtures": "Load data fixtures" diff --git a/src/Command/LoadDataFixturesDoctrineODMCommand.php b/src/Command/LoadDataFixturesDoctrineODMCommand.php index 38897d50..684a7606 100644 --- a/src/Command/LoadDataFixturesDoctrineODMCommand.php +++ b/src/Command/LoadDataFixturesDoctrineODMCommand.php @@ -8,6 +8,8 @@ use Doctrine\Bundle\MongoDBBundle\ManagerRegistry; use Doctrine\Common\DataFixtures\Executor\MongoDBExecutor; use Doctrine\Common\DataFixtures\Purger\MongoDBPurger; +use Psr\Log\AbstractLogger; +use Stringable; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -83,8 +85,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int $purger = new MongoDBPurger($dm); $executor = new MongoDBExecutor($dm, $purger); - $executor->setLogger(static function ($message) use ($output): void { - $output->writeln(sprintf(' > %s', $message)); + $executor->setLogger(new class ($output) extends AbstractLogger { + public function __construct(private readonly OutputInterface $output) + { + } + + public function log(mixed $level, string|Stringable $message, array $context = []): void + { + $this->output->writeln(sprintf(' > %s', $message)); + } }); $executor->execute($fixtures, $input->getOption('append')); From acdb901ae86f445f1406b98d9f864056e0a070e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Sat, 7 Dec 2024 00:52:36 +0100 Subject: [PATCH 2/4] Restrict compatibility constraints with psr/log and doctrine/data-fixtures (#866) --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9f85cdd7..fa4fda4f 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "composer-runtime-api": "^2.0", "doctrine/mongodb-odm": "^2.6", "doctrine/persistence": "^3.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", + "psr/log": "^2.0 || ^3.0", "symfony/config": "^6.4 || ^7.0", "symfony/console": "^6.4 || ^7.0", "symfony/dependency-injection": "^6.4 || ^7.0", @@ -53,7 +53,7 @@ "vimeo/psalm": "^5.25" }, "conflict": { - "doctrine/data-fixtures": "<1.8" + "doctrine/data-fixtures": "<1.8 || >=3" }, "suggest": { "doctrine/data-fixtures": "Load data fixtures" From fd059f137c9ed66314653fe85d7264f47b27ea40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 07:08:09 +0000 Subject: [PATCH 3/4] Bump codecov/codecov-action from 4 to 5 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 074f65cc..0c229588 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -116,7 +116,7 @@ jobs: path: "reports" - name: "Upload to Codecov" - uses: "codecov/codecov-action@v4" + uses: "codecov/codecov-action@v5" with: directory: reports env: From 4612763f3c4487f3a65fe64cb659386a1690b985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 10 Dec 2024 08:19:29 +0100 Subject: [PATCH 4/4] Specify target branch This repository has a default branch that is different than the lowest branch. --- .github/dependabot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 15bd1729..4bcb5e5e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,4 @@ updates: interval: "weekly" labels: - "CI" + target-branch: "5.1.x"