Skip to content

Commit

Permalink
Fix traits use statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Nov 15, 2014
1 parent b1c3643 commit ff30b93
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 15 deletions.
5 changes: 0 additions & 5 deletions doc/blameable.md
Expand Up @@ -612,7 +612,6 @@ to use the Traits provided by extensions.
namespace Blameable\Fixture;

use Gedmo\Blameable\Traits\BlameableEntity;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;

/**
Expand Down Expand Up @@ -640,10 +639,6 @@ class UsingTrait
}
```

**Note:** you must import **Gedmo\Mapping\Annotation as Gedmo** and **Doctrine\ORM\Mapping as ORM**
annotations. If you use mongodb ODM import **Doctrine\ODM\MongoDB\Mapping\Annotations as ODM** and
**BlameableDocument** instead.

The Traits are very simplistic - if you use different field names it is recommended to simply create your
own Traits specific to your project. The ones provided by this bundle can be used as example.

5 changes: 0 additions & 5 deletions doc/ip_traceable.md
Expand Up @@ -521,7 +521,6 @@ to use the Traits provided by extensions.
namespace IpTraceable\Fixture;

use Gedmo\IpTraceable\Traits\IpTraceableEntity;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;

/**
Expand Down Expand Up @@ -549,10 +548,6 @@ class UsingTrait
}
```

**Note:** you must import **Gedmo\Mapping\Annotation as Gedmo** and **Doctrine\ORM\Mapping as ORM**
annotations. If you use mongodb ODM import **Doctrine\ODM\MongoDB\Mapping\Annotations as ODM** and
**IpTraceableDocument** instead.

The Traits are very simplistic - if you use different field names it is recommended to simply create your
own Traits specific to your project. The ones provided by this bundle can be used as example.

Expand Down
5 changes: 0 additions & 5 deletions doc/timestampable.md
Expand Up @@ -648,7 +648,6 @@ to use the Traits provided by extensions.
namespace Timestampable\Fixture;

use Gedmo\Timestampable\Traits\TimestampableEntity;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;

/**
Expand Down Expand Up @@ -676,10 +675,6 @@ class UsingTrait
}
```

**Note:** you must import **Gedmo\Mapping\Annotation as Gedmo** and **Doctrine\ORM\Mapping as ORM**
annotations. If you use mongodb ODM import **Doctrine\ODM\MongoDB\Mapping\Annotations as ODM** and
**TimestampableDocument** instead.

Traits are very simple and if you use different field names I recommend to simply create your
own ones based per project. These ones are standing as an example.

1 change: 1 addition & 0 deletions lib/Gedmo/Blameable/Traits/BlameableDocument.php
Expand Up @@ -2,6 +2,7 @@

namespace Gedmo\Blameable\Traits;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Gedmo/Blameable/Traits/BlameableEntity.php
Expand Up @@ -2,6 +2,7 @@

namespace Gedmo\Blameable\Traits;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Gedmo/IpTraceable/Traits/IpTraceableDocument.php
Expand Up @@ -2,6 +2,7 @@

namespace Gedmo\IpTraceable\Traits;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Gedmo/IpTraceable/Traits/IpTraceableEntity.php
Expand Up @@ -2,6 +2,7 @@

namespace Gedmo\IpTraceable\Traits;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
Expand Down
2 changes: 2 additions & 0 deletions lib/Gedmo/SoftDeleteable/Traits/SoftDeleteableDocument.php
Expand Up @@ -2,6 +2,8 @@

namespace Gedmo\SoftDeleteable\Traits;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;

/**
* SoftDeletable Trait, usable with PHP >= 5.4
*
Expand Down
2 changes: 2 additions & 0 deletions lib/Gedmo/SoftDeleteable/Traits/SoftDeleteableEntity.php
Expand Up @@ -2,6 +2,8 @@

namespace Gedmo\SoftDeleteable\Traits;

use Doctrine\ORM\Mapping as ORM;

/**
* SoftDeletable Trait, usable with PHP >= 5.4
*
Expand Down
1 change: 1 addition & 0 deletions lib/Gedmo/Timestampable/Traits/TimestampableDocument.php
Expand Up @@ -2,6 +2,7 @@

namespace Gedmo\Timestampable\Traits;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Gedmo/Timestampable/Traits/TimestampableEntity.php
Expand Up @@ -2,6 +2,7 @@

namespace Gedmo\Timestampable\Traits;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Gedmo/Tree/Traits/NestedSetEntity.php
Expand Up @@ -2,6 +2,7 @@

namespace Gedmo\Tree\Traits;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
Expand Down

0 comments on commit ff30b93

Please sign in to comment.