Doctrine2 Tips

Doctrine2 uses specific functions compared to most other frameworks and even compared to original Doctrine. This article lists functions and features specific for Doctrine2 which can be easily used and managed by Skipper.

Defining namespace

Skipper fully supports namespaces in Doctrine2 projects. Each bundle in Skipper can have its own namespace. If you want to configure namespace, choose bundle and edit namespace property inside the ORM property editor.

Define Doctine2 namespace property in Skipper

Entity file-suffix format

In some cases you will need to change the entity file-suffix while using the same export format. For example to use Doctrine2 with Symfony2 it is necessary to change exported file names from .dcm.yml to .orm.yml. You can do this manually for each bundle or each entity. The recommended way is to change file name format for the whole bundle:

Define Doctrine2 definition file suffix for export in Skipper

Entity export path

When importing Doctrine2 project, Skipper saves relative location of each entity. This means that when you export the model, all files will be created at the exact locations they were before. The export path for each entity is stored in the ORM property export-file-name.

Define Doctrine2 schema definitions export path in Skipper