Doctrine SoftDelete Gedmo Вызов неопределенного метода Doctrine \ ORM \ Event \ LifecycleEventArgs :: format () - PullRequest
0 голосов
/ 01 октября 2018

Я получаю следующую ошибку

1) Tests \ SampleBundle \ Controller \ DiseaseControllerTest :: testPostDisease Ошибка: вызов неопределенного метода Doctrine \ ORM \ Event \ LifecycleEventArgs :: format () / home / travis /build / Test / Sample-API / vendor / doctrine / dbal / lib / Doctrine / DBAL / Types / DateTimeType.php: 53 / home / travis / build / Test / Sample-API / vendor / doctrine / dbal / lib / Doctrine /DBAL / Statement.php: 114 /home/travis/build/Test/Sample-API/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:277 / home / travis / build / Test /Пример API / vendor / doctrine / orm / lib / Doctrine / ORM / UnitOfWork.php: 1014 /home/travis/build/Test/Sample-API/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:378 /home/travis/build/Test/Sample-API/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356 / home / travis / build / Test / Sample-API / var / cache / test /ContainerTiyhq34 / EntityManager_9a5be93.php: 170 /home/travis/build/Test/Sample-API/src/SampleBundle/Helper/Helper.php:78 / home / travis / build / Test / Sample-API / src /SampleBundle / Manager / DiseaseManager.php: 36 /home/travis/build/Test/Sample-API/src/SampleBundle/Controller/DiseaseController.php:47 / home / travis / build / Test / Sample-API / vendor / symfony /symfony / src / Symfony / Component / HttpKernel / HttpKernel.php: 151 /home/travis/build/Test/Sample-API/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Http68/100

`/ ** * BaseEntity * * @Orm \ MappedSuperclass * @ORM \ HasLifecycleCallbacks () * @Gedmo \ SoftDeleteable (fieldName =" deleAt ", timeAware = false) * / class BaseEntity {/ ** * @var int* * @ORM \ Column (name = "id", type = "integer") * @ORM \ Id * @ORM \ GeneratedValue (стратегии = "IDENTITY") * / protected $ id;

/**
 * @var \DateTime
 * @Gedmo\Timestampable(on="create")
 * @ORM\Column(name="created_at", type="datetime", nullable=true)
 */
protected $createdAt;

/**
 * @var \DateTime
 *
 * @Gedmo\Timestampable(on="update")
 * @ORM\Column(name="modified_at", type="datetime", nullable=true)
 */
protected $modifiedAt;

/**
 * @var \DateTime
 *
 * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
 */
protected $deletedAt;

/**
 * @var int
 *
 * @ORM\Column(name="deleted_by", type="integer", nullable=true)
 */
protected $deletedBy;

/**
 * @var int
 *
 * @ORM\Column(name="soft_deleted", type="boolean")
 */
protected $softDeleted = 0;

/**
 * @return \DateTime
 */
public function getCreatedAt()
{
    return $this->createdAt;
}

/**
 * @param \DateTime $createdAt
 *
 * @ORM\PrePersist
 */
public function setCreatedAt($createdAt)
{
    $this->createdAt  = $createdAt;
}

/**
 * @return \DateTime
 */
public function getModifiedAt()
{
    return $this->modifiedAt;
}

/**
 * @param \DateTime $modifiedAt
 */
public function setModifiedAt($modifiedAt)
{
    $this->modifiedAt = $modifiedAt;
}

/**
 * @return \DateTime
 */
public function getDeletedAt()
{
    return $this->deletedAt;
}

/**
 * @param \DateTime $deletedAt
 */
public function setDeletedAt($deletedAt)
{
    $this->deletedAt = $deletedAt;
}

/**
 * @return int
 */
public function getDeletedBy()
{
    return $this->deletedBy;
}

/**
 * @param int $deletedBy
 */
public function setDeletedBy($deletedBy)
{
    $this->deletedBy = $deletedBy;
}

/**
 * @return int
 */
public function getSoftDeleted()
{
    return $this->softDeleted;
}

/**
 * @param int $softDeleted
 */
public function setSoftDeleted($softDeleted)
{
    $this->softDeleted = $softDeleted;
}

/**
 * @return int
 */
public function getId()
{
    return $this->id;
}

} `

Composer.json "require": { "php": ">=7.0.0", "symfony/symfony": "3.4.*", "doctrine/orm": "^2.5", "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-cache-bundle": "^1.2", "symfony/monolog-bundle": "^3.0", "symfony/polyfill-apcu": "^1.0", "sensio/distribution-bundle": "^5.0", "sensio/framework-extra-bundle": "^3.0.2", "incenteev/composer-parameter-handler": "^2.0", "friendsofsymfony/rest-bundle": "^2.1", "jms/serializer-bundle": "^1.1", "doctrine/doctrine-migrations-bundle": "^1.2", "doctrine/migrations": "^1.4", "nandanprac/php-openid": "^2.3", "raven/raven": "0.12.1", "aws/aws-sdk-php": "3.15.1", "guzzlehttp/guzzle": "~6.2", "elasticsearch/elasticsearch": "5.3.0", "graylog2/gelf-php": "^1.5", "leezy/pheanstalk-bundle": "2.*", "practo/buzz": "dev-master", "stof/doctrine-extensions-bundle": "^1.3" },

Конфиг:` orm: auto_generate_proxy_classes: "% kernel.debug%" naming_strategy: doctrine.orm.naming_strategy.underscore auto_mapping: true metadata_cache_driver:doctrine.cache% query_cache_driver:% doctrine.cache%

    filters:
        softdeleteable:
            class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
            enabled: true

`

Я не могу найти какие-либо исправления.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...