Skip to content

Commit

Permalink
Move doctrine/annotations to "require-dev"
Browse files Browse the repository at this point in the history
  • Loading branch information
W0rma committed Oct 22, 2024
1 parent 6e721b7 commit 2dd73d9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,29 @@ jobs:
symfony-require: "^6.0"
- php-version: 8.1
symfony-require: "^6.0"
- php-version: 8.1
symfony-require: "^6.0"
remove-annotations: yes
- php-version: 8.2
symfony-require: "^6.0"
- php-version: 8.2
symfony-require: "^6.0"
remove-annotations: yes
- php-version: 8.3
symfony-require: "^6.0"
- php-version: 8.3
symfony-require: "^6.0"
remove-annotations: yes
- php-version: 8.4
symfony-require: "^6.0"
composer-options: "--ignore-platform-req=php+" # TODO remove once phpspec/prophecy supports PHP 8.4
- php-version: 8.2
symfony-require: "^7.0"
- php-version: 8.3
symfony-require: "^7.0"
- php-version: 8.3
symfony-require: "^7.0"
remove-annotations: yes
- php-version: 8.4
symfony-require: "^7.0"
composer-options: "--ignore-platform-req=php+" # TODO remove once phpspec/prophecy supports PHP 8.4
Expand All @@ -65,6 +77,13 @@ jobs:
ini-values: "zend.assertions=1"
tools: "flex"

- name: "Remove remove-annotations if required"
if: "${{ matrix.remove-annotations == 'yes' }}"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony-require }}"
run: |
composer remove --no-update --dev doctrine/annotations
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
env:
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ This will resolve the latest stable version.

Otherwise, install the library and setup the autoloader yourself.

If you want to use [**annotations**](#annotations) for configuration you need
to install the `doctrine/annotations` package:

```sh
composer require doctrine/annotations
```

If your app uses PHP 8.1 or higher it is recommended to use native PHP
attributes.
In this case you don't need to install the Doctrine package.

### Working With Symfony

There is a bundle for that! Install the
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
],
"require": {
"php": "^7.2 | ^8.0",
"doctrine/annotations": "^1.13.2 || ^2.0",
"jms/metadata": "^2.0",
"jms/serializer": "^3.18.2",
"symfony/expression-language": "~3.0 || ~4.0 || ~5.0 || ~6.0 || ~7.0"
},
"require-dev": {
"phpunit/phpunit": "^7 | ^9.5.10",
"doctrine/annotations": "^1.13.2 || ^2.0",
"doctrine/coding-standard": "^12.0",
"doctrine/persistence": "^1.3.4 | ^2.0 | ^3.0",
"pagerfanta/core": "^2.4 || ^3.0",
Expand Down

0 comments on commit 2dd73d9

Please sign in to comment.