Skip to content

Commit b81a215

Browse files
authored
Merge pull request #77 from adrorocker/1.x
Add support for php8.1
2 parents 18984df + 3735edb commit b81a215

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ jobs:
66
name: PHP ${{ matrix.php }} - doctrine/orm ${{ matrix.orm }}
77
strategy:
88
matrix:
9-
php: ['7.2', '7.3', '7.4', '8.0']
9+
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
1010
orm: ['2.6', '2.7', '2.8', '2.9', '2.10', '2.11']
1111
exclude:
1212
- php: '8.0'
1313
orm: '2.6.0'
1414
- php: '8.0'
1515
orm: '2.7.0'
16+
- php: '8.1'
17+
orm: '2.6.0'
18+
- php: '8.1'
19+
orm: '2.7.0'
1620
steps:
1721
- uses: actions/checkout@v2
1822
- name: Setup PHP

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^7.2|^8.0",
26+
"php": "^7.2|^8.0|^8.1",
2727
"doctrine/dbal": "^2.10|^3.3",
2828
"doctrine/orm": "^2.6",
2929
"doctrine/inflector": "^1.4|^2.0",

src/Builders/Entity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function readOnly()
5454
public function cacheable($usage = ClassMetadataInfo::CACHE_USAGE_READ_ONLY, $region = null)
5555
{
5656
$meta = $this->builder->getClassMetadata();
57-
$meta->enableCache(compact('usage', $region === null ?: 'region'));
57+
$meta->enableCache(compact('usage', $region === null ? [] : 'region'));
5858

5959
return $this;
6060
}

tests/Builders/EntityListenersTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ protected function setUp(): void
3636
*
3737
* @param string $event
3838
* @param string $listener
39-
* @param string|null $method
4039
* @param string $expectedMethod
40+
* @param string|null $method
4141
*/
42-
public function test_can_add_event_listeners($event, $listener, $method = null, $expectedMethod)
42+
public function test_can_add_event_listeners($event, $listener, $expectedMethod, $method = null)
4343
{
4444
$this->builder->{$event}($listener, $method);
4545

@@ -108,7 +108,7 @@ public function eventsProvider()
108108
[Events::onFlush, StubEntityListener::class, 'handle', 'handle'],
109109
[Events::postFlush, StubEntityListener::class, 'handle', 'handle'],
110110
[Events::onClear, StubEntityListener::class, 'handle', 'handle'],
111-
[Events::onClear, StubEntityListener::class, null, 'onClear'],
111+
[Events::onClear, StubEntityListener::class, 'onClear', null],
112112
];
113113
}
114114
}

0 commit comments

Comments
 (0)