From 60d3e1ad81ed48c746fe490738a339f05faabfd1 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Wed, 11 Oct 2023 22:06:13 -0400 Subject: [PATCH] Add ORM 3.x compat --- .github/workflows/run-tests.yml | 13 ++++++++++++- composer.json | 2 +- lib/Adapter/Doctrine/ORM/composer.json | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9d4da09f..f927cca5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -189,19 +189,26 @@ jobs: fail-fast: true matrix: php: ['8.1', '8.2'] + orm: [''] composer-flags: ['--prefer-stable --prefer-dist'] next-php: [false] patch-packages: [false] include: - php: '8.1' + orm: '' composer-flags: '--prefer-stable --prefer-dist --prefer-lowest' next-php: false - php: '8.2' + orm: '^3.0@beta' + composer-flags: '--prefer-stable --prefer-dist' + next-php: false + - php: '8.2' + orm: '' composer-flags: '--prefer-stable --prefer-dist' next-php: false patch-packages: true - name: Doctrine ORM - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}${{ matrix.patch-packages && ' (Patched Packages)' || '' }} + name: Doctrine ORM{{ matrix.orm != '' && format(' {0}', matrix.orm) || '' }} - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}${{ matrix.patch-packages && ' (Patched Packages)' || '' }} steps: - name: Checkout code @@ -219,6 +226,10 @@ jobs: if: ${{ matrix.patch-packages }} run: php .github/patch-packages.php + - name: Restrict ORM version + if: ${{ matrix.orm }} + run: (cd lib/Adapter/Doctrine/ORM && composer require --no-update doctrine/orm:${{ matrix.orm }}) + - name: Install dependencies run: (cd lib/Adapter/Doctrine/ORM && composer update ${{ matrix.composer-flags }}) diff --git a/composer.json b/composer.json index 94847893..f28e45a7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "doctrine/collections": "^1.8 || ^2.0", "doctrine/dbal": "^3.5", "doctrine/mongodb-odm": "^2.4", - "doctrine/orm": "^2.14", + "doctrine/orm": "^2.14 || ^3.0", "doctrine/phpcr-odm": "^1.7", "dg/bypass-finals": "^1.5.1", "jackalope/jackalope-doctrine-dbal": "^1.9", diff --git a/lib/Adapter/Doctrine/ORM/composer.json b/lib/Adapter/Doctrine/ORM/composer.json index 4a1b708a..8e97bda6 100644 --- a/lib/Adapter/Doctrine/ORM/composer.json +++ b/lib/Adapter/Doctrine/ORM/composer.json @@ -6,7 +6,7 @@ "license": "MIT", "require": { "php": "^8.1", - "doctrine/orm": "^2.14", + "doctrine/orm": "^2.14 || ^3.0", "pagerfanta/core": "^3.7 || ^4.0" }, "require-dev": {