symfony - Symfony2: Best way to share entities between two apps deployed in different environments -


I am developing two apps in symfony2, administration for users and one for others. I know that some of the best architectural administrators proposed by some and build bundles with frontend namespaces. But in my case, I do not do this because the administration and the frontend app have to be deployed in different environments. Admin will be deployed on an intranet (not public use), while the frontend will normally be deployed in the public domain. The problem is that two apps use the same entities and I do not know the best way to share this institution between two apps.

I think that you understand the unit sections, and not the actual institutions stored in the database. In that case, your problem can easily be solved by creating a bundle which maintains the institutions (and other codes that need to be shared between the two code base) and making a git repository for it. . You can then refer to this repository of this property's deps file. After this, call at php bin / vendors install will add your bundle to the seller directory. Just register the bundle with each project and you should be ready to go.

View on Symfony2 and Git.

Hope this will be helpful.

Comments