简体   繁体   中英

combine symfony1 and Symfony2 projects

There is an existing website developed in symfony1.0 (propel as ORM). I have developed a module in Symfony2 (Doctrine2 as ORM) for the website. Both have authentication. New module should use members from existing database. Session between them should not be broken. What steps should I follow? How to handle this?

I think you should create a custom user provider in your Symfony2 project to be able to share the users between two projects (but first check if you could use the doctrine user provider ).

You should also implement a custom authentication provider to automatically log user in in the Symfony2 app if he was logged in symfony1. You'd probably need to inspect symfony1 session and based on that log user in (or not).

It might be worth looking at the IngewikkeldWrapperBundle which wraps symfony1 project in Symfony2.

It's also worth watching a talk from Symfony Live 2011: Nice performance using Sf2 cache wrapping Sf1 application:

Last but not least go through the docs:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM