Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from goetas/max-depth
Max depth issues when used with "embedded" relations
- Loading branch information
Showing
12 changed files
with
224 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Hateoas\Tests\Fixtures; | ||
|
||
use JMS\Serializer\Annotation as Serializer; | ||
|
||
class Gh236Bar | ||
{ | ||
/** | ||
* @Serializer\Expose() | ||
*/ | ||
public $xxx = 'yyy'; | ||
|
||
/** | ||
* @Serializer\Expose() | ||
*/ | ||
public $inner; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace Hateoas\Tests\Fixtures; | ||
|
||
use Hateoas\Configuration\Annotation as Hateoas; | ||
use JMS\Serializer\Annotation as Serializer; | ||
|
||
|
||
/** | ||
* @Hateoas\Relation( | ||
* name = "b_embed", | ||
* embedded = @Hateoas\Embedded( | ||
* "expr(object.b)", | ||
* exclusion = @Hateoas\Exclusion(maxDepth=1) | ||
* ) | ||
* ) | ||
*/ | ||
class Gh236Foo | ||
{ | ||
/** | ||
* @Serializer\Expose() | ||
* @Serializer\MaxDepth(1) | ||
*/ | ||
public $a; | ||
|
||
/** | ||
* @Serializer\Exclude() | ||
*/ | ||
public $b; | ||
|
||
public function __construct() | ||
{ | ||
$this->a = new Gh236Bar(); | ||
$this->a->inner = new Gh236Bar(); | ||
|
||
$this->b = new Gh236Bar(); | ||
$this->b->xxx = 'zzz'; | ||
$this->b->inner = new Gh236Bar(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.