On Tue, Jul 17, 2012 at 10:01 PM, Matt Robinson <m
...@lazycat.org> wrote:
> On 17 Jul 2012, at 12:57, Gopi Krishna M <mgo
...@gmail.com> wrote:
> > Hi..
> > We have a web app built on symfony1.4 and are thinking of migrating to
> symfony 2 primarily to make sure we are not on an obsolete platform and get
> the goodness of symfony 2 : speed, doctrine2.0, bundles etc.
> > Is there a good way of cohosting both 1.4 and 2.0 (using the same
> backend database) and migrate parts of the app in phases? Does anybody have
> any experiences to share in migrating from 1.4 to symfony 2?
> The simple advice is "don't", but I'd be interested in your experiences if
> you go ahead with this anyway.
> What you'll want to avoid is having two overlapping frameworks - you'll
> have trouble with session management, you'd have to reimplement your model
> layer twice, etc etc.
> You could try abstracting all the model and business logic into standalone
> class libraries in the Symfony 1.4 version of your project, and then
> declare them as services in your Symfony2 project, so that you're not
> rewriting a bunch of code. You can ease that process by using (for example)
> the Symfony2 class-loader and dependency injection container in your
> symfony 1.4 project - add a few methods to your ProjectConfiguration class
> to set them up, and then start refactoring your 1.4 project so that model
> calls go via the service container instead.
> Once the guts of your Symfony 1.4 project are running as Symfony2
> services, starting a new Symfony2 project that uses those same services
> should be a lot easier, and you can gradually refactor over time to take
> advantage of more Symfony2 components.
> Honestly though, it might be more trouble than it's worth, and being able
> to use some Symfony2 components in your Symfony 1.4 project might go some
> way to solving any problems you have anyway.
> --
> Matt Robinson
> http://inanimatt.com/
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
> You received this message because you are subscribed to the Google
> Groups "symfony1" group.
> To post to this group, send email to symfony1@googlegroups.com
> To unsubscribe from this group, send email to
> symfony1+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony1?hl=en