2017 © Pedro Peláez
 

symfony-bundle doctrine-entity-override-bundle

Symfony bundle which allows to override entities by using inheritance

image

joschi127/doctrine-entity-override-bundle

Symfony bundle which allows to override entities by using inheritance

  • Tuesday, June 5, 2018
  • by joschi127
  • Repository
  • 1 Watchers
  • 3 Stars
  • 4,327 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 14 Versions
  • 46 % Grown

The README.md

doctrine-entity-override-bundle

Build Status, (*1)

Symfony bundle which allows to override entities by using inheritance, (*2)

Configuration

Add to app/config/config.yml:, (*3)

# override entities
joschi127_doctrine_entity_override:
    overridden_entities:
        # Keep in mind: if you are using multi level inheritance, you have to use the top most super class on the
        # left side
        OriginalBundle\Entity\Example: CustomizedBundle\Entity\Example

Hints

  • If you are using multi level inheritance, you have to use the top most super class on the left side in the configuration under overridden_entities.
  • If you are using multi level inheritance, the properties of the class in between have to be protected, otherwise you will get a ReflectionException saying Property ...::$propertyName does not exist.
  • It is recommended that the original entity is defined as MappedSuperclass. You can do so if it is your own code. If you want to extend other, third party entities, this should work in most cases. But parts of the mapping will be regenerated internally by the LoadORMMetadataSubscriber of this bundle and at least some doctrine mapping features might not be supported and you might run into issues.
  • Using @ORM\AttributeOverrides is not supported, instead just override the property in your customized entity class and add the ORM mapping for the property in your customized entity as usual. This bundle will then unload the original mapping configuration and only use your customized mapping.
  • Have a look at the Tests/Functional/src folder for some example code.

The Versions

05/06 2018
05/06 2018

dev-travis-php71-php72

dev-travis-php71-php72 https://github.com/joschi127/doctrine-entity-override-bundle

Symfony bundle which allows to override entities by using inheritance

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar joschi127

override doctrine entity doctrine2 inheritance customize mapped-superclass

15/05 2016
14/05 2016
13/05 2016

v0.3.1

0.3.1.0 https://github.com/joschi127/doctrine-entity-override-bundle

Symfony bundle which allows to override entities by using inheritance

  Sources   Download

MIT

The Requires

 

by Avatar joschi127

override doctrine entity doctrine2 inheritance customize mapped-superclass

12/02 2016

v0.3.0

0.3.0.0 https://github.com/joschi127/doctrine-entity-override-bundle

Symfony bundle which allows to override entities by using inheritance

  Sources   Download

MIT

The Requires

 

by Avatar joschi127

override doctrine entity doctrine2 inheritance customize mapped-superclass

12/02 2016

v0.2.1

0.2.1.0 https://github.com/joschi127/doctrine-entity-override-bundle

Symfony bundle which allows to override entities by using inheritance

  Sources   Download

MIT

The Requires

 

by Avatar joschi127

override doctrine entity doctrine2 inheritance customize mapped-superclass

12/02 2016

v0.2.0

0.2.0.0 https://github.com/joschi127/doctrine-entity-override-bundle

Symfony bundle which allows to override entities by using inheritance

  Sources   Download

MIT

The Requires

 

by Avatar joschi127

override doctrine entity doctrine2 inheritance customize mapped-superclass

10/02 2016

v0.1.0

0.1.0.0 https://github.com/joschi127/doctrine-entity-override-bundle

Symfony bundle which allows to override entities by using inheritance

  Sources   Download

MIT

The Requires

 

by Avatar joschi127

override doctrine entity doctrine2 inheritance customize mapped-superclass