Skip to content

Commit 44c6296

Browse files
committed
compatibility with version 2.0 models
1 parent b9def92 commit 44c6296

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
0.4.0
5+
-----
6+
7+
* allow `2.x` releases of the `php-xapi/model` package too
8+
49
0.3.0
510
-----
611

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
],
1313
"require": {
1414
"doctrine/common": "~2.4",
15-
"php-xapi/model": "^1.0",
16-
"php-xapi/repository-api": "^0.3",
15+
"php-xapi/model": "^1.0 || ^2.0",
16+
"php-xapi/repository-api": "^0.3 || ^0.4",
1717
"ramsey/uuid": "^2.9"
1818
},
1919
"require-dev": {
2020
"php-xapi/test-fixtures": "^1.0"
2121
},
22+
"minimum-stability": "dev",
2223
"conflict": {
2324
"xabbuh/xapi-doctrine-storage": "*"
2425
},
@@ -34,7 +35,7 @@
3435
},
3536
"extra": {
3637
"branch-alias": {
37-
"dev-master": "0.3.x-dev"
38+
"dev-master": "0.4.x-dev"
3839
}
3940
}
4041
}

tests/Unit/Repository/StatementRepositoryTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
namespace XApi\Repository\Doctrine\Tests\Unit\Repository;
1313

14-
use Rhumsaa\Uuid\Uuid;
14+
use Rhumsaa\Uuid\Uuid as RhumsaUuid;
1515
use Xabbuh\XApi\DataFixtures\StatementFixtures;
1616
use Xabbuh\XApi\DataFixtures\VerbFixtures;
1717
use Xabbuh\XApi\Model\StatementId;
1818
use Xabbuh\XApi\Model\StatementsFilter;
19+
use Xabbuh\XApi\Model\Uuid as ModelUuid;
1920
use XApi\Repository\Doctrine\Mapping\Statement as MappedStatement;
2021
use XApi\Repository\Doctrine\Repository\StatementRepository;
2122

@@ -42,7 +43,12 @@ protected function setUp()
4243

4344
public function testFindStatementById()
4445
{
45-
$statementId = StatementId::fromUuid(Uuid::uuid4());
46+
if (class_exists('Xabbuh\XApi\Model\Uuid')) {
47+
$statementId = StatementId::fromUuid(ModelUuid::uuid4());
48+
} else {
49+
$statementId = StatementId::fromUuid(RhumsaUuid::uuid4());
50+
}
51+
4652
$this
4753
->mappedStatementRepository
4854
->expects($this->once())

0 commit comments

Comments
 (0)