Skip to content

Commit 8f0dbb2

Browse files
Remove doctrine extensions bundle, #33
1 parent ad3c76a commit 8f0dbb2

File tree

5 files changed

+9
-209
lines changed

5 files changed

+9
-209
lines changed

app/AppKernel.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public function registerBundles()
1717
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
1818
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
1919
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
20-
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
2120
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
2221

2322
new Event\EventBundle\EventEventBundle(),

app/config/config.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ doctrine:
5656
auto_generate_proxy_classes: %kernel.debug%
5757
auto_mapping: true
5858

59-
stof_doctrine_extensions:
60-
default_locale: "%locale%"
61-
orm:
62-
default:
63-
timestampable: true
64-
6559
# Swiftmailer Configuration
6660
swiftmailer:
6761
transport: %mailer_transport%

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"doctrine/common": "^2.6",
2727
"doctrine/orm": "^2.5",
2828
"doctrine/doctrine-bundle": "^1.6",
29-
"stof/doctrine-extensions-bundle": "dev-master",
3029
"friendsofsymfony/jsrouting-bundle": "^1.6"
3130
},
3231
"require-dev": {

composer.lock

Lines changed: 2 additions & 183 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Event/EventBundle/Entity/CallForPaper.php

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
namespace Event\EventBundle\Entity;
44

55
use Doctrine\ORM\Mapping as ORM;
6-
use Gedmo\Mapping\Annotation as Gedmo;
76

87
/**
98
* CallForPaper
109
*
1110
* @ORM\Table(name="ev_call_for_paper")
1211
* @ORM\Entity(repositoryClass="Event\EventBundle\Entity\Repository\CallForPaperRepository")
12+
* @ORM\HasLifecycleCallbacks()
1313
*/
1414
class CallForPaper
1515
{
@@ -105,19 +105,10 @@ class CallForPaper
105105
/**
106106
* @var \DateTime $created
107107
*
108-
* @Gedmo\Timestampable(on="create")
109108
* @ORM\Column(type="datetime")
110109
*/
111110
private $created;
112111

113-
/**
114-
* @var \DateTime $updated
115-
*
116-
* @Gedmo\Timestampable(on="update")
117-
* @ORM\Column(type="datetime")
118-
*/
119-
private $updated;
120-
121112
/**
122113
* @var Event
123114
*
@@ -353,23 +344,21 @@ public function getNote()
353344
}
354345

355346
/**
356-
* Get created
357-
*
358-
* @return \DateTime
347+
* @ORM\PrePersist
359348
*/
360-
public function getCreated()
349+
public function setCreatedAtValue()
361350
{
362-
return $this->created;
351+
$this->created = new \DateTime();
363352
}
364353

365354
/**
366-
* Get updated
355+
* Get created
367356
*
368357
* @return \DateTime
369358
*/
370-
public function getUpdated()
359+
public function getCreated()
371360
{
372-
return $this->updated;
361+
return $this->created;
373362
}
374363

375364
/**

0 commit comments

Comments
 (0)