A proposal for a new PHP-FIG PSR introducing a PdoProviderInterface, a single-method interface that abstracts the source of a PDO connection rather than the connection itself. Inspired by PSR-20's ClockInterface pattern, the interface exposes a getConnection() method, allowing libraries to receive a connection provider instead of a fixed PDO instance. This enables lazy connections, reconnection logic, and pooling without the consumer needing to know the details. It also enables interoperability between major DBAL libraries like Doctrine, Illuminate, and others without snapshot leaking. A pull request is open against the PHP-FIG standards repository.
Table of contents
The real problem #The solution: PdoProviderInterface #The pre-draft PSR #Feedback #Sort: