-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes for PHP 8.4 #229
Changes for PHP 8.4 #229
Conversation
This can go to 6.x , else we need to make sure the connect method is not removed or another alternate approach needed . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two discussions points: which versions to support and should the static function connect return an immediate connection?
src/ExtendedPdo.php
Outdated
@@ -100,7 +113,11 @@ public function connect(): void | |||
// connect | |||
$this->profiler->start(__FUNCTION__); | |||
list($dsn, $username, $password, $options, $queries) = $this->args; | |||
$this->pdo = new PDO($dsn, $username, $password, $options); | |||
if(version_compare(phpversion(), '8.4.0', '<')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove this check and only support PHP 8.4
src/ExtendedPdo.php
Outdated
?ProfilerInterface $profiler = null | ||
): static { | ||
$pdo = new static($dsn, $username, $password, $options ?? [], $queries, $profiler); | ||
$pdo->establishConnection(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to connect immediately when using driver specific constructor? I'd say we always connect lazily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single discussion left
Thanks for the effort @srjlewis. I might have advocated my points strongly but I really appreciate the work. |
I am ok with the changes. Thank you guys. |
No description provided.