Skip to content

Commit 2ea4124

Browse files
committed
Merge pull request #359 from alcaeus/php-7-tests
Add PHP 7 to the build matrix using polyfill
2 parents f4d043d + 6d33970 commit 2ea4124

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ php:
44
- 5.5
55
- 5.6
66

7+
env:
8+
- MONGO_DRIVER=mongo
9+
710
matrix:
811
include:
912
- php: 5.5
10-
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
13+
env: MONGO_DRIVER=mongo COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
14+
- php: 7.0
15+
env: ADAPTER_VERSION="^1.0.0" MONGO_DRIVER=mongodb
1116

1217
sudo: false
1318

@@ -18,8 +23,8 @@ cache:
1823
services: mongodb
1924

2025
before_install:
21-
- yes '' | pecl -q install -f mongo
22-
- php --ri mongo
26+
- yes '' | pecl -q install -f $MONGO_DRIVER
27+
- if [ "x${ADAPTER_VERSION}" != "x" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi
2328

2429
install:
2530
- composer update $COMPOSER_FLAGS

Tests/Fixtures/Form/Category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Category
1111
/** @ODM\Id */
1212
protected $id;
1313

14-
/** @ODM\String */
14+
/** @ODM\Field(type="string") */
1515
public $name;
1616

1717
/**

Tests/Fixtures/Form/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Document
1111
/** @ODM\Id(strategy="none") */
1212
protected $id;
1313

14-
/** @ODM\String */
14+
/** @ODM\Field(type="string") */
1515
public $name;
1616

1717
/**

Tests/Fixtures/Security/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class User implements UserInterface
1111
/** @ODM\Id(strategy="none") */
1212
protected $id;
1313

14-
/** @ODM\String */
14+
/** @ODM\Field(type="string") */
1515
public $name;
1616

1717
public function __construct($id, $name) {

Tests/Fixtures/Validator/Document.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class Document
1010
/** @ODM\Id(strategy="none") */
1111
protected $id;
1212

13-
/** @ODM\String */
13+
/** @ODM\Field(type="string") */
1414
public $name;
1515

16-
/** @ODM\Hash */
16+
/** @ODM\Field(type="hash") */
1717
public $hash;
1818

1919
/** @ODM\Collection */
@@ -36,6 +36,6 @@ public function __construct($id) {
3636
/** @ODM\EmbeddedDocument */
3737
class EmbeddedDocument
3838
{
39-
/** @ODM\String */
39+
/** @ODM\Field(type="string") */
4040
public $name;
4141
}

0 commit comments

Comments
 (0)