Doctrine DBAL

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Doctrine DBAL

Post by MichaelC »

After our change of template engine to twig it makes sense to follow a similar pattern for our DBAL for similar reasons:
  • It's more extensible
  • It should improve performance (Doctrine does some awesome SQL query combining)
  • It allows better interoperability
  • We don't have to maintain it ourselves
  • Known by developers outside of phpBB but also very easy to pick up by phpBB developers
  • A wrapper can be employed so BC is not broken (similar to the request class)
This change would likely be a 3.2 change but BC would be kept with an old wrapper so it could go into 3.1 if it's done well enough and in time.
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Doctrine DBAL & ORM

Post by EXreaction »

I believe these should be treated as two separate RFCs/issues.

Switching to the Doctrine DBAL is relatively simple, it just takes a good chunk of time and someone interested in doing it (I've tried it once already, with a couple hours of work you can be using Doctrine for 95% of phpBB, though cleanup and the remaining usage will be much more time).

Supporting the ORM is not much, if any work after that point, but using the ORM for phpBB code is a point that would need to be discussed separately at that time.

As far as switching to Doctrine; great if someone is willing to pick it up and take care of it. I for one see many other items with much worse and older code that should be moved to use other frameworks/libraries before the DBAL (e.g. message parser/bbcodes, messenger/email, file transfers) as, the way I see it, those chunks of code are very old, not maintainable, and lack many highly desired features, whereas the DBAL does pretty much everything we need it to do right now. If someone were willing to take this project up I would love to see it and happy to assist/review/merge it, but I think the development team has other priorities to focus on at this time.

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: Doctrine DBAL & ORM

Post by MichaelC »

I'm quite willing to pick up the DBAL (at some point in the next few months) at least as it makes interop between symfony and phpBB easier, same with decoupling sessions & auth a bit more which I'm doing at the moment.

I'd appreciate any work that has already been done. ;)
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Doctrine DBAL

Post by EXreaction »

The work I did was just to test it, I don't know if I have the code I was starting in a branch, but I don't think I'd want to use what I had anyways (I basically made Doctrine a new DBAL driver, then forwarded all the requests to Doctrine).

CHItA
Development Team
Development Team
Posts: 169
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: Doctrine DBAL

Post by CHItA »

Any new opinions on this for 3.3?

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: Doctrine DBAL

Post by Nicofuma »

+1 on the initial proposal: nuke our current DBAL, expose doctrine dbal through a new service and make the service dbal.conn a simple wrapper for the doctrine service (wrapper which will be nuked in 4.0)
Member of the phpBB Development-Team
No Support via PM

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Doctrine DBAL

Post by DavidIQ »

If it supports the same variety we currently support then sure, why not.
Image

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: Doctrine DBAL

Post by Nicofuma »

doctrine dbal is currently supporting

Code: Select all


    MySQL
    Oracle
    Microsoft SQL Server
    PostgreSQL
    SAP Sybase SQL Anywhere
    SQLite
    Drizzle

Member of the phpBB Development-Team
No Support via PM

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: Doctrine DBAL

Post by MichaelC »

Nicofuma wrote: Fri Jan 29, 2016 10:52 pm +1 on the initial proposal: nuke our current DBAL, expose doctrine dbal through a new service and make the service dbal.conn a simple wrapper for the doctrine service (wrapper which will be nuked in 4.0)
+1 to this

https://tracker.phpbb.com/browse/PHPBB3-14463
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

Post Reply