# PDO subclass names

- Thread: https://externals.io/message/123183
- Original archive: https://news-web.php.net/php.internals/123183
- Started by Stephen Reay on 2024-04-23T13:17:59+00:00
- Messages: 8
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #123183 — Stephen Reay — 2024-04-23T13:17:59+00:00

URL: https://externals.io/message/123183#123183

﻿
Sent from my iPhone

> 
> ﻿On 23/04/2024 10:25, Stephen Reay wrote:
> > […]
> 
> Hi Stephen,
> 
> Granted, but I also believe the user can and should have the reasonable expectation that they can work comfortably (without conflicts or aliases) using leaf (class) names exclusively.
> 
> Kind regards,
> Bilge

I'm sorry but I think you've missed the entire point of namespaces if you want class names to all be universally unique without their namespace component.

The referenced RFC gives clear examples of how a class with a prefix would be converted to a namespace and class.

---

## #123186 — Arvids Godjuks — 2024-04-23T14:59:24+00:00

URL: https://externals.io/message/123183#123186 · In reply to: #123183

A thought crossed my mind, considering that MariaDB and MySQL are drifting
more and more apart with features and nuances of how they work, would it be
a good idea to create an alias to MySQL PDO driver under MariaDB name so we
can create a MariaDB specific implementation down the road and so people
can use DB specific features right away and not be confused why there are
errors between those 2 if someone swaps one for the other.

-- 

Arvīds Godjuks
+371 26 851 664
arvids.godjuks@gmail.com
Telegram: @psihius https://t.me/psihius

---

## #123227 — Gina P. Banyard — 2024-04-29T13:10:53+00:00

URL: https://externals.io/message/123183#123227 · In reply to: #123186

> A thought crossed my mind, considering that MariaDB and MySQL are drifting more and more apart with features and nuances of how they work, would it be a good idea to create an alias to MySQL PDO driver under MariaDB name so we can create a MariaDB specific implementation down the road and so people can use DB specific features right away and not be confused why there are errors between those 2 if someone swaps one for the other.

IMHO, this is out of scope for this proposal.
If MariaDB wants to maintain a specific PDO Driver they can do so themselves and publish it on PECL, same as how CUBRID (and others) does currently.

Best regards,

Gina P. Banyard

---

## #123232 — Matteo Beccati — 2024-04-30T09:06:44+00:00

URL: https://externals.io/message/123183#123232 · In reply to: #123227

Hi,

Il 29/04/2024 15:10, Gina P. Banyard ha scritto:
> 
> On Tuesday, 23 April 2024 at 15:59, Arvids Godjuks 
> <arvids.godjuks@gmail.com> wrote:
> > […]
> 
> IMHO, this is out of scope for this proposal.

Yes, indeed.


> If MariaDB wants to maintain a specific PDO Driver they can do so 
> themselves and publish it on PECL, same as how CUBRID (and others) does 
> currently.

That is true, however it's mysqlnd the part that deals with the network 
protocol, which they wouldn't be able to modify from PECL. That said, 
I'm not an expert on mysql/maria, but I also doubt the changes are 
significant enough that they need a separate driver.


Cheers
-- 
Matteo Beccati

Development & Consulting - http://www.beccati.com/

---

## #123234 — Arvids Godjuks — 2024-04-30T11:07:53+00:00

URL: https://externals.io/message/123183#123234 · In reply to: #123232

> Hi,
>
>
> > […]
>
> That is true, however it's mysqlnd the part that deals with the network
> protocol, which they wouldn't be able to modify from PECL. That said,
> I'm not an expert on mysql/maria, but I also doubt the changes are
> significant enough that they need a separate driver.
>

 I wasn't proposing rolling a separate driver or anything like that, just
an alias that would reserve a namespace for MariaDB and if there's ever a
need to actually roll the driver, that alias be replaced with actual driver.
The thing is at this point MySQL and MariaDB have a different set of
additional capabilities that are not compatible between the two. Doctrine,
at this point, actually makes a distinction between MariaDB and MySQL -
those are considered different databases.
This would allow people to use MariaDB and MySQL-specific functionality by
using the respective driver namespace and remove any confusion about if
this works with both or only one of them.

I know it seems to be out of scope, but this deals with PDO subclass names
and this seems to be a thing to consider here. Sure, we can have a separate
RFC about it, but I think this is the right moment to handle this question.



-- 

Arvīds Godjuks
+371 26 851 664
arvids.godjuks@gmail.com
Telegram: @psihius https://t.me/psihius

---

## #123236 — Saki Takamachi — 2024-04-30T12:41:58+00:00

URL: https://externals.io/message/123183#123236 · In reply to: #123234

Hi Arvīds,

>  I wasn't proposing rolling a separate driver or anything like that, just an alias that would reserve a namespace for MariaDB and if there's ever a need to actually roll the driver, that alias be replaced with actual driver.
> The thing is at this point MySQL and MariaDB have a different set of additional capabilities that are not compatible between the two. Doctrine, at this point, actually makes a distinction between MariaDB and MySQL - those are considered different databases.
> This would allow people to use MariaDB and MySQL-specific functionality by using the respective driver namespace and remove any confusion about if this works with both or only one of them.
> 
> I know it seems to be out of scope, but this deals with PDO subclass names and this seems to be a thing to consider here. Sure, we can have a separate RFC about it, but I think this is the right moment to handle this question.

It's a very interesting subject, but off-topic for this thread. The purpose of this thread is to make a correction based on the Namespace RFC, since the RFC regarding namespaces and the RFC regarding PDO subclasses are in conflict with each other.

That is, the PDO subclass RFC was passed in violation of the namespace RFC, and we are proposing the appropriate fix for it.
(However, this is a very grey area. The Namespaces RFC "recommends" the use of namespaces, rather than mandating it.)

Personally, I believe this fix does not require a new RFC.

Regards,

Saki

---

## #123237 — Calvin Buckley — 2024-04-30T14:58:05+00:00

URL: https://externals.io/message/123183#123237 · In reply to: #123234

> 
> Hi,
> 
> 
> > […]
> 
> That is true, however it's mysqlnd the part that deals with the network 
> protocol, which they wouldn't be able to modify from PECL. That said, 
> I'm not an expert on mysql/maria, but I also doubt the changes are 
> significant enough that they need a separate driver.
> 
>  I wasn't proposing rolling a separate driver or anything like that, just an alias that would reserve a namespace for MariaDB and if there's ever a need to actually roll the driver, that alias be replaced with actual driver.
> The thing is at this point MySQL and MariaDB have a different set of additional capabilities that are not compatible between the two. Doctrine, at this point, actually makes a distinction between MariaDB and MySQL - those are considered different databases.
> This would allow people to use MariaDB and MySQL-specific functionality by using the respective driver namespace and remove any confusion about if this works with both or only one of them.
> 
> I know it seems to be out of scope, but this deals with PDO subclass names and this seems to be a thing to consider here. Sure, we can have a separate RFC about it, but I think this is the right moment to handle this question.
> 

Has the network protocol diverged much? I know storage engines, query language, etc. might change, but the underlying protocol might be similar.

---

## #123238 — Jeffrey Dafoe — 2024-04-30T15:36:18+00:00

URL: https://externals.io/message/123183#123238 · In reply to: #123237

> > […]
> using the respective driver namespace and remove any confusion about if this
> works with both or only one of them.
> > […]
> and this seems to be a thing to consider here. Sure, we can have a separate
> RFC about it, but I think this is the right moment to handle this question.
> > […]
> 
> Has the network protocol diverged much? I know storage engines, query
> language, etc. might change, but the underlying protocol might be similar.

Saw this on a Jira ticket for MaxScale: "The MariaDB and MySQL protocols are mostly identical and the differences are of opt-in character."
