Git Product home page Git Product logo

doctrineextensions's Introduction

Doctrine2 behavioral extensions

Version 2.2-DEV

Latest updates

Note: Use 2.1.x tag in order to use extensions based on Doctrine2.1.x versions. Currently master branch is based on 2.2.x versions and may not work with 2.1.x components

2011-10-08

  • Thanks to @acasademont Translatable now does not store translations for default locale. It is always left as original record value. So be sure you do not change your default locale per project or per data migration. This way it is more rational and unnecessary to store it additionaly in translation table.

2011-09-24

  • Sluggable was refactored with a BC break for the sake of simplicity it now uses a single @Slug annotation. Also there were slug handlers introduced for extended sluggable functionality, like path based or relation based slugs. See the documentation

Summary and features

This package contains extensions for Doctrine2 that hook into the facilities of Doctrine and offer new functionality or tools to use Doctrine2 more efficently. This package contains mostly used behaviors which can be easily attached to your event system of Doctrine2 and handle the records being flushed in the behavioral way. List of extensions:

  • Tree - this extension automates the tree handling process and adds some tree specific functions on repository. (closure or nestedset)
  • Translatable - gives you a very handy solution for translating records into diferent languages. Easy to setup, easier to use.
  • Sluggable - urlizes your specified fields into single unique slug
  • Timestampable - updates date fields on create, update and even property change.
  • Loggable - helps tracking changes and history of objects, also supports version managment.
  • Sortable - makes any document or entity sortable

Currently these extensions support Yaml, Annotation and Xml mapping. Additional mapping drivers can be easily implemented using Mapping extension to handle the additional metadata mapping.

Note: Please note, that xml mapping needs to be in a different namespace, the declared namespace for Doctrine extensions is http://gediminasm.org/schemas/orm/doctrine-extensions-mapping So root node now looks like this:

Note: Use 2.1.x tag in order to use extensions based on Doctrine2.1.x versions. Currently master branch is based on 2.2.x versions and may not work with 2.1.x

<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                 xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
...
</doctrine-mapping>

ODM MongoDB support

List of extensions which support ODM

  • Translatable
  • Sluggable
  • Timestampable
  • Loggable
  • Sortable

All these extensions can be nested together and mapped in traditional ways - annotations, xml or yaml

Notice: extension tutorial on doctrine blog is outdated, most recent documentation is in doc directory. There is a post introducing to these extensions on doctrine project

You can test these extensions on my blog.

All tutorials for basic usage examples are on my blog also.

Running the tests:

PHPUnit 3.5 or newer is required. To setup and run tests follow these steps:

  • go to the root directory of extensions
  • run: php bin/vendors.php
  • run: phpunit -c tests
  • optional - run mongodb in background to complete all tests

Contributors:

doctrineextensions's People

Contributors

l3pp4rd avatar lbotsch avatar stof avatar julesbou avatar comfortablynumb avatar acasademont avatar helmer avatar mathiasverraes avatar orgil avatar aersoy avatar problematic avatar 1ed avatar bobthecow avatar upsilon avatar leevigraham avatar hason avatar vrtak-cz avatar weaverryan avatar merk avatar miljar avatar everzet avatar jaugustin avatar pfeigl avatar

Watchers

Marc avatar Sergi de Pablos avatar Marlon avatar Juanma Orta avatar Jose Gil avatar  avatar James Cloos avatar  avatar Aleix Vergés avatar Juan Gabriel Rodríguez Carrión avatar Gorka López de Torre avatar Félix Carpena avatar Karel Osorio avatar Agustin Armellini Fischer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.