Skip to content

Ensure forward compatibility with ipl-sql by adding return types#269

Merged
lippserd merged 2 commits intomainfrom
fix/compat-with-ipl-sql-Connection-class
Mar 23, 2026
Merged

Ensure forward compatibility with ipl-sql by adding return types#269
lippserd merged 2 commits intomainfrom
fix/compat-with-ipl-sql-Connection-class

Conversation

@sukhwinder33445
Copy link
Copy Markdown
Contributor

@sukhwinder33445 sukhwinder33445 commented Feb 27, 2026

Add explicit return types to ipl-sql-derived methods to prepare for strict
typing. These additions are safe, as they only annotate existing methods that
previously lacked return type declarations.

refs Icinga/ipl-sql#100

@sukhwinder33445 sukhwinder33445 force-pushed the fix/compat-with-ipl-sql-Connection-class branch from 50202d9 to d8c8a26 Compare February 27, 2026 16:04
@sukhwinder33445 sukhwinder33445 force-pushed the fix/compat-with-ipl-sql-Connection-class branch from d8c8a26 to 41eb2f3 Compare March 2, 2026 16:15
@sukhwinder33445 sukhwinder33445 changed the title RetryConnection: Make class compatible with ipl\Sql\Connection Ipl forward compatibility Mar 6, 2026
@sukhwinder33445 sukhwinder33445 force-pushed the fix/compat-with-ipl-sql-Connection-class branch from 41eb2f3 to b90c97c Compare March 6, 2026 13:16
Copy link
Copy Markdown
Contributor

@BastianLedererIcinga BastianLedererIcinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with ipl main and modernize branches, both works fine.

Copy link
Copy Markdown
Member

@lippserd lippserd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase as well.

class RetryConnection extends Connection
{
public function prepexec($stmt, $values = null)
public function prepexec($stmt, $values = null): false|PDOStatement
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function prepexec($stmt, $values = null): false|PDOStatement
public function prepexec($stmt, $values = null): PDOStatement|false

@sukhwinder33445 sukhwinder33445 force-pushed the fix/compat-with-ipl-sql-Connection-class branch 2 times, most recently from f55f072 to 8522ce5 Compare March 20, 2026 08:18
@sukhwinder33445 sukhwinder33445 force-pushed the fix/compat-with-ipl-sql-Connection-class branch from 8522ce5 to b397e1e Compare March 20, 2026 16:55
@lippserd lippserd changed the title Ipl forward compatibility Ensure forward compatibility with ipl-sql by adding return types Mar 23, 2026
@lippserd lippserd merged commit 238a8fb into main Mar 23, 2026
13 checks passed
@lippserd lippserd deleted the fix/compat-with-ipl-sql-Connection-class branch March 23, 2026 15:18
@lippserd lippserd added this to the 1.1.0 milestone Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants