Skip to content

Commit 7cfeb9c

Browse files
committed
Add PHP 8.2 compatibility
1 parent c2a6096 commit 7cfeb9c

File tree

9 files changed

+31
-4
lines changed

9 files changed

+31
-4
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- 7.4
1717
- 8.0
1818
- 8.1
19+
- 8.2
1920

2021
steps:
2122
- uses: actions/checkout@v2
@@ -39,3 +40,4 @@ jobs:
3940
- run: composer run test
4041

4142
- run: composer run lint -- --dry-run
43+
if: ${{ matrix.php <= '8.0' }}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"doctrine/orm": "^2.7"
1414
},
1515
"require-dev": {
16+
"doctrine/cache": "^1.11",
1617
"friendsofphp/php-cs-fixer": "^2.14",
1718
"nesbot/carbon": "*",
1819
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",

src/Query/Mysql/CharLength.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
class CharLength extends FunctionNode
1212
{
13-
private $expr;
13+
private $expr1;
1414

1515
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string
1616
{

src/Query/Mysql/Power.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class Power extends FunctionNode
99
{
1010
public $arithmeticExpression;
1111

12+
public $power;
13+
1214
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string
1315
{
1416
return 'POWER(' . $this->arithmeticExpression->dispatch($sqlWalker) . ', '

src/Query/Sqlite/ConcatWs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker): string
6363
// Iterate over the captured expressions and add them to the query.
6464
for ($i = 1; $i < count($this->values); $i++) {
6565
if ($i > 1) {
66-
$queryBuilder[] = " || '${separator}' || ";
66+
$queryBuilder[] = " || '{$separator}' || ";
6767
}
6868

6969
// Dispatch the walker on the current node.

tests/Entities/CarbonDate.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,24 @@ class CarbonDate
3333
* @Column(type="CarbonTime", nullable=true)
3434
*/
3535
public $time;
36+
37+
/**
38+
* @Column(type="CarbonImmutableDate", nullable=true)
39+
*/
40+
public $date_immutable;
41+
42+
/**
43+
* @Column(type="CarbonImmutableDateTime", nullable=true)
44+
*/
45+
public $datetime_immutable;
46+
47+
/**
48+
* @Column(type="CarbonImmutableDateTimeTz", nullable=true)
49+
*/
50+
public $datetime_tz_immutable;
51+
52+
/**
53+
* @Column(type="CarbonImmutableTime", nullable=true)
54+
*/
55+
public $time_immutable;
3656
}

tests/Query/Mysql/TrigTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
class TrigTest extends \DoctrineExtensions\Tests\Query\MysqlTestCase
66
{
7+
private $entity;
8+
79
public function setUp(): void
810
{
911
parent::setUp();

tests/Types/CarbonDateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
class CarbonDateTest extends TestCase
1818
{
19-
public $entityManager = null;
19+
private $em;
2020

2121
public static function setUpBeforeClass(): void
2222
{

tests/Types/ZendDateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
class ZendDateTest extends TestCase
1414
{
15-
public $entityManager = null;
15+
private $em;
1616

1717
public static function setUpBeforeClass(): void
1818
{

0 commit comments

Comments
 (0)