Skip to content

Commit

Permalink
Fixed tests for php7
Browse files Browse the repository at this point in the history
  • Loading branch information
goetas committed May 6, 2016
1 parent c17f188 commit a8ab1fd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ php:

matrix:
allow_failures:
- php: 7.0
- php: hhvm

before_script:
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"jms/metadata": "~1.1",
"jms/parser-lib": "1.*",
"phpcollection/phpcollection": "~0.1",
"doctrine/annotations": "1.*",
"doctrine/instantiator": "~1.0.3"
"doctrine/annotations": "^1.0",
"doctrine/instantiator": "^1.0.3"
},
"conflict": {
"twig/twig": "<1.12"
Expand All @@ -28,8 +28,8 @@
"require-dev": {
"twig/twig": "~1.12|~2.0",
"doctrine/orm": "~2.1",
"doctrine/phpcr-odm": "^1.0.1",
"jackalope/jackalope-doctrine-dbal": "1.0.*",
"doctrine/phpcr-odm": "^1.3",
"jackalope/jackalope-doctrine-dbal": "^1.0",
"propel/propel1": "~1.7",
"symfony/yaml": "2.*",
"symfony/translation": "~2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Author
protected $id;

/**
* @PHPCRODM\String()
* @PHPCRODM\Field(type="string")
* @SerializedName("full_name")
*/
private $name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@ class BlogPost
protected $id;

/**
* @PHPCRODM\String()
* @PHPCRODM\Field(type="string")
* @Groups({"comments","post"})
*/
private $title;

/**
* @PHPCRODM\String()
* @PHPCRODM\Field(type="string")
*/
protected $slug;

/**
* @PHPCRODM\Date()
* @PHPCRODM\Field(type="date")
* @XmlAttribute
*/
private $createdAt;

/**
* @PHPCRODM\Boolean()
* @PHPCRODM\Field(type="boolean")
* @Type("integer")
* This boolean to integer conversion is one of the few changes between this
* and the standard BlogPost class. It's used to test the override behavior
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Comment
private $blogPost;

/**
* @PHPCRODM\String()
* @PHPCRODM\Field(type="string")
*/
private $text;

Expand Down
1 change: 0 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@
$loader->add('JMS\Serializer\Tests', __DIR__);

AnnotationRegistry::registerLoader('class_exists');
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/DoctrineAnnotations.php');
});

0 comments on commit a8ab1fd

Please sign in to comment.