Skip to content

Commit

Permalink
Start testing on PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Sep 18, 2021
1 parent 045dced commit 228af50
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 3 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
- php: 7.4
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
composer-flags: '--prefer-dist --ignore-platform-req=php'
next-php: true

name: Core - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}

Expand Down Expand Up @@ -51,6 +54,9 @@ jobs:
- php: 7.4
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
composer-flags: '--prefer-dist --ignore-platform-req=php'
next-php: true

name: Doctrine Collections - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}

Expand Down Expand Up @@ -90,6 +96,9 @@ jobs:
- php: 7.4
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
composer-flags: '--prefer-dist --ignore-platform-req=php'
next-php: true

name: Doctrine DBAL - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}

Expand Down Expand Up @@ -124,11 +133,16 @@ jobs:
matrix:
php: [7.4, 8.0]
composer-flags: ['--prefer-stable --prefer-dist']
extensions: ['curl, iconv, mbstring, mongodb, zip']
next-php: [false]
include:
- php: 7.4
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
composer-flags: '--prefer-dist --ignore-platform-req=php'
extensions: 'curl, iconv, mbstring, mongodb-1.11.0alpha1, zip'
next-php: true

name: Doctrine MongoDB ODM - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}

Expand All @@ -141,7 +155,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: curl, iconv, mbstring, mongodb, zip
extensions: ${{ matrix.extensions }}
coverage: pcov

- name: Patch Composer manifests
Expand All @@ -168,6 +182,9 @@ jobs:
- php: 7.4
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
composer-flags: '--prefer-dist --ignore-platform-req=php'
next-php: true

name: Doctrine ORM - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}

Expand Down Expand Up @@ -207,6 +224,9 @@ jobs:
- php: 7.4
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
composer-flags: '--prefer-dist --ignore-platform-req=php'
next-php: true

name: Doctrine PHPCR ODM - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}

Expand Down Expand Up @@ -248,6 +268,10 @@ jobs:
elastica: ^6.0
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
elastica: ^7.0
composer-flags: '--prefer-dist --ignore-platform-req=php'
next-php: true
exclude:
- php: 8.0
elastica: ^6.0
Expand Down Expand Up @@ -294,6 +318,10 @@ jobs:
solarium: ^5.0
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
solarium: ^6.0
composer-flags: '--prefer-dist --ignore-platform-req=php'
next-php: true
exclude:
- php: 8.0
solarium: ^5.0
Expand Down Expand Up @@ -340,6 +368,10 @@ jobs:
twig: ^1.35
composer-flags: '--prefer-stable --prefer-dist --prefer-lowest'
next-php: false
- php: 8.1
twig: ^3.0
composer-flags: '--prefer-dist --ignore-platform-req=php'
next-php: true

name: Twig ${{ matrix.twig }} - PHP ${{ matrix.php }} - Composer ${{ matrix.composer-flags }}

Expand Down
7 changes: 6 additions & 1 deletion lib/Adapter/Doctrine/ORM/Tests/QueryAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ public function testResultSetIsLoadedWithCaseInSelectStatement(): void
$items = $adapter->getSlice(0, 10);

$this->assertSame('Foo', $items[0][0]->name);
$this->assertSame('1', $items[0]['relevance']);

if (\PHP_VERSION_ID >= 80100) {
$this->assertSame(1, $items[0]['relevance']);
} else {
$this->assertSame('1', $items[0]['relevance']);
}
}

public function testAQueryBuilderIsAccepted(): void
Expand Down
1 change: 1 addition & 0 deletions lib/Adapter/Doctrine/ORM/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"symfony/deprecation-contracts": "^2.1"
},
"require-dev": {
"doctrine/annotations": "^1.11.1",
"doctrine/cache": "^1.11 || ^2.0",
"phpunit/phpunit": "^9.5",
"symfony/cache": "^4.4 || ^5.2 || ^6.0",
Expand Down
4 changes: 4 additions & 0 deletions lib/Adapter/Doctrine/ORM/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>

<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=17"/>
</php>
</phpunit>
4 changes: 4 additions & 0 deletions lib/Adapter/Elastica/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>

<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[indirect]=1"/>
</php>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
</listeners>

<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[indirect]=2"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[indirect]=3&amp;max[direct]=17"/>
</php>
</phpunit>

0 comments on commit 228af50

Please sign in to comment.