1.7.1 2017-11-03 12:19 UTC

This package is auto-updated.

Last update: 2023-02-06 23:33:10 UTC


A bridge for webforge and symfony with the usual suspects

Use the DateTimeHandler

composer require webforge/symfony

add to your config.yml/services.yml from symfony:

    - { resource: '../../vendor/webforge/symfony/Resources/config/services.yml' }

when you're using the webforge/doctrine-compiler with serializer extension your all set for WebforgeDateTime-Types. Otherwise use annotations like this:

use Doctrine\ORM\Mapping AS ORM;
use JMS\Serializer\Annotation AS Serializer;

class EntityWithTimestamp {

   * modified timestamp saves the time and date of the last modification
   * @var Webforge\Common\DateTime\DateTime
   * @ORM\Column(type="WebforgeDateTime", nullable=true)
   * @Serializer\Expose
   * @Serializer\Type("WebforgeDateTime")
  protected $modified = NULL;

  public function updateModified() {
    $this->modified = \Webforge\Common\DateTime\DateTime::now();