Skip to content

Commit

Permalink
Address removal/deprecation of ArrayType/ObjectType
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jul 12, 2022
1 parent d479cfd commit e17dfb8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
</ignoreFiles>
</projectFiles>
<issueHandlers>
<DeprecatedConstant>
<errorLevel type="suppress">
<file name="lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php" />
</errorLevel>
</DeprecatedConstant>
<DeprecatedClass>
<errorLevel type="suppress">
<!-- Remove on 3.0.x -->
Expand Down
8 changes: 8 additions & 0 deletions tests/Doctrine/Tests/ORM/Functional/TypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

use DateTime;
use DateTimeZone;
use Doctrine\DBAL\Types\ArrayType;
use Doctrine\DBAL\Types\ObjectType;
use Doctrine\DBAL\Types\Types;
use Doctrine\Tests\Models\Generic\BooleanModel;
use Doctrine\Tests\Models\Generic\DateTimeModel;
Expand Down Expand Up @@ -70,6 +72,9 @@ public function testBoolean(): void

public function testArray(): void
{
if (! class_exists(ArrayType::class)) {
self::markTestSkipped('Test valid for doctrine/dbal:3.x only.');
}
$serialize = new SerializationModel();
$serialize->array['foo'] = 'bar';
$serialize->array['bar'] = 'baz';
Expand All @@ -88,6 +93,9 @@ public function testArray(): void

public function testObject(): void
{
if (! class_exists(ObjectType::class)) {
self::markTestSkipped('Test valid for doctrine/dbal:3.x only.');
}
$serialize = new SerializationModel();
$serialize->object = new stdClass();

Expand Down

0 comments on commit e17dfb8

Please sign in to comment.