Skip to content

Commit

Permalink
Do not force register datetime type
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Mar 23, 2020
1 parent 5ee3848 commit 2caff12
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
use IPub\DoctrineTimestampable;
use IPub\DoctrineTimestampable\Events;
use IPub\DoctrineTimestampable\Mapping;
use IPub\DoctrineTimestampable\Types;

/**
* Doctrine timestampable extension container
Expand Down Expand Up @@ -86,24 +85,6 @@ public function beforeCompile() : void
->addSetup('?->getEventManager()->addEventSubscriber(?)', ['@self', $builder->getDefinition($this->prefix('subscriber'))]);
}

/**
* {@inheritdoc}
*/
public function afterCompile(Code\ClassType $class) : void
{
parent::afterCompile($class);

/** @var Code\Method $initialize */
$initialize = $class->methods['initialize'];
$initialize->addBody(
'Doctrine\DBAL\Types\Type::addType(?, ?);',
[
Types\UTCDateTime::UTC_DATETIME,
Types\UTCDateTime::class,
]
);
}

/**
* @param Nette\Configurator $config
* @param string $extensionName
Expand Down

0 comments on commit 2caff12

Please sign in to comment.