diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9d4da09f..5e089416 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -233,19 +233,26 @@ jobs: fail-fast: true matrix: php: ['8.1', '8.2'] + odm: [''] composer-flags: ['--prefer-stable --prefer-dist'] next-php: [false] patch-packages: [false] include: - php: '8.1' + odm: '' composer-flags: '--prefer-stable --prefer-dist --prefer-lowest' next-php: false - php: '8.2' + odm: '^2.0@beta' + composer-flags: '--prefer-dist --prefer-lowest' + next-php: false + - php: '8.2' + odm: '' composer-flags: '--prefer-stable --prefer-dist' next-php: false patch-packages: true - name: Doctrine PHPCR ODM - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}${{ matrix.patch-packages && ' (Patched Packages)' || '' }} + name: Doctrine PHPCR ODM${{ matrix.odm != '' && format(' {0}', matrix.odm) || '' }} - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}${{ matrix.patch-packages && ' (Patched Packages)' || '' }} steps: - name: Checkout code @@ -263,6 +270,10 @@ jobs: if: ${{ matrix.patch-packages }} run: php .github/patch-packages.php + - name: Restrict ODM version + if: ${{ matrix.odm }} + run: (cd lib/Adapter/Doctrine/PHPCRODM && composer require --no-update doctrine/phpcr-odm:${{ matrix.odm }}) + - name: Install dependencies run: (cd lib/Adapter/Doctrine/PHPCRODM && composer update ${{ matrix.composer-flags }}) diff --git a/composer.json b/composer.json index 94847893..181d0a78 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "doctrine/dbal": "^3.5", "doctrine/mongodb-odm": "^2.4", "doctrine/orm": "^2.14", - "doctrine/phpcr-odm": "^1.7", + "doctrine/phpcr-odm": "^1.7 || ^2.0", "dg/bypass-finals": "^1.5.1", "jackalope/jackalope-doctrine-dbal": "^1.9", "phpstan/extension-installer": "^1.3.1", diff --git a/lib/Adapter/Doctrine/PHPCRODM/Tests/bootstrap.php b/lib/Adapter/Doctrine/PHPCRODM/Tests/bootstrap.php new file mode 100644 index 00000000..bc195cbe --- /dev/null +++ b/lib/Adapter/Doctrine/PHPCRODM/Tests/bootstrap.php @@ -0,0 +1,11 @@ + diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 959178bb..6c520378 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -6,6 +6,7 @@ BypassFinals::setWhitelist([ '*/Doctrine/ODM/MongoDB/*', + '*/Doctrine/ODM/PHPCR/*', ]); BypassFinals::enable(bypassReadOnly: false);