Kori 29ec20bda1 Fix exception when attempting to read swagger annotation for virtual property (#1136)
* Fix exception when attempting to read swagger annotation for virtual property

* drop jms 1.0, add stopwatch for dependency
2017-12-09 14:31:56 +01:00

40 lines
690 B
PHP

<?php
namespace Nelmio\ApiDocBundle\Tests\Functional\Entity;
use JMS\Serializer\Annotation as Serializer;
/**
* Class VirtualProperty
* @package Nelmio\ApiDocBundle\Tests\Functional\Entity
*
* @Serializer\ExclusionPolicy("all")
* @Serializer\VirtualProperty(
* "email",
* exp="object.user.email",
* options={@Serializer\Type("string")}
* )
*/
class VirtualProperty
{
/**
* @var int
* @Serializer\Type("integer")
* @Serializer\Expose
*/
private $id;
/**
* @var User
*/
private $user;
public function __construct()
{
$this->user = new User();
$this->user->setEmail("dummy@test.com");
}
}