Skip to content

Instantly share code, notes, and snippets.

@mneuhaus
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mneuhaus/7c789c40bd1bcd38b7ce to your computer and use it in GitHub Desktop.
Save mneuhaus/7c789c40bd1bcd38b7ce to your computer and use it in GitHub Desktop.
Using DoctrineExtension Traits

Currently you can't properly use the DoctrineExtension Traits because the Flow Reflection chokes on them because the properties used in them don't declare a @var type.

I created a pull-request to get those @var types into that package :)

doctrine-extensions/DoctrineExtensions#1092

<?php
/**
* A Report
*
* @Flow\Entity
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
*/
class Foo {
use TimestampableEntity;
use SoftDeleteableEntity;
?>
TYPO3:
Flow:
object:
excludeClasses:
'gedmo.doctrineextensions': ['.*']
persistence:
doctrine:
filters:
'SoftDeleteableFilter': 'Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter'
eventListeners:
-
events: ['prePersist', 'onFlush', 'loadClassMetadata']
listener: 'Gedmo\Timestampable\TimestampableListener'
-
events: ['loadClassMetadata', 'onFlush']
listener: 'Gedmo\SoftDeleteable\SoftDeleteableListener'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment