Author: Derick Rethans (derickr)
Date: 2026-05-21T14:02:36+01:00

Commit: 
https://github.com/php/web-master/commit/dad6b21c443e546efe0fb2dd4e2e6f0e5718e3d7
Raw diff: 
https://github.com/php/web-master/commit/dad6b21c443e546efe0fb2dd4e2e6f0e5718e3d7.diff

Make DB class compatible with PHP 8.4 (maintaining support for PHP 8.2)

Changed paths:
  M  src/DB.php


Diff:

diff --git a/src/DB.php b/src/DB.php
index e9338fa..0309ed6 100644
--- a/src/DB.php
+++ b/src/DB.php
@@ -6,7 +6,7 @@
 
 final class DB extends PDO
 {
-    public static function connect(): self
+    public static function connect(string $dsn, ?string $username = null, 
?string $password = null, ?array $options = null): static
     {
         $connectionConfig = 'mysql:host=' . self::getHost() . ';port=' . 
self::getPort() . ';dbname=' . self::getDatabase();
 

Reply via email to