From 565b987f7643fffcdc27747018fee01f4f0fd726 Mon Sep 17 00:00:00 2001 From: Alexis Lefebvre Date: Tue, 4 Apr 2023 20:12:39 +0200 Subject: [PATCH] composer: move doctrine/annotations to require-dev and suggest --- .github/workflows/tests.yml | 2 ++ composer.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d4c8a010..71f3a86a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,6 +64,8 @@ jobs: symfony/validator=${{ matrix.symfony-version }} symfony/yaml=${{ matrix.symfony-version }} + # This is needed to fix builds where the `annotation_reader` service may not be set up if + # the Annotations package is not in the production dependencies - name: Require Annotations v1 to require for PHP 7 if: startsWith(matrix.php-version, '7.') run: composer require --no-update "doctrine/annotations:^1.8.0" diff --git a/composer.json b/composer.json index 2fe996ff..b19cf1c7 100644 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ ], "require": { "php": "^7.2 || ^8.0", - "doctrine/annotations": "^1.3 || ^2.0", "phpunit/phpunit": "^7.5.0 || ^8.0 || ^9.0", "symfony/browser-kit": "^4.4 || ^5.1 || ^6.0", "symfony/framework-bundle": "^4.4 || ^5.1 || ^6.0" }, "require-dev": { "ext-json": "*", + "doctrine/annotations": "^1.3 || ^2.0", "doctrine/doctrine-bundle": "^2.1", "doctrine/orm": "^2.7", "monolog/monolog": "~1.11", @@ -41,6 +41,7 @@ "symfony/framework-bundle": "4.3.0" }, "suggest": { + "doctrine/annotations": "Required to use the @QueryCount(…) annotation", "liip/test-fixtures-bundle": "Efficient loading of Doctrine fixtures in functional test-cases for Symfony applications" }, "autoload": {