Icinga / Icinga/ipl-sql

`Connection`: Call to methods of PDO methods through `__call` magic method unidentified by PHPStan

Open
#81 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Call to methods like Connection::lastInsertID(), Connection::errorInfo() etc, through __call() magic method is unidentified by PHPStan. This can be solved by one of the following three solutions:

  1. Using @method annotation in PHPDoc to say which methods of the PDO object is found inside the class.
  2. Explicitly implement the methods that are required in the class.
  3. Implement a getter method for PDO object and access PDO object's methods through it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the Connection class's __call handling and the reported PHPStan diagnostics for calls such as lastInsertID() and errorInfo(). Confirm with maintainers which of the three listed approaches is intended; done means PHPStan recognizes the supported PDO methods exposed through Connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
database
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.