Skip to content
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

False positives with DB-specific PDO extensions #195

Open
jlherren opened this issue Nov 18, 2024 · 2 comments
Open

False positives with DB-specific PDO extensions #195

jlherren opened this issue Nov 18, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jlherren
Copy link

First, I love the new extension detection in 1.8.0! ❤️ I discovered extensions in composer.json that I wasn't using.

However, it now flags ext-pdo_sqlite and ext-pdo_mysql as being unused, when they are clearly used in code such as:

$pdo = new PDO('sqlite::memory:')

I understand that this will be hard to detect precisely, so maybe error reporting on ext-pdo_* should be excluded entirely? Errors on ext-pdo work fine.

@janedbal
Copy link
Member

janedbal commented Nov 18, 2024

Currently, the analysis relies solely on used symbols in your codebase. PDO class belongs to ext-pdo. Looks like no ext-pdo_xxx has any dedicated symbols, so those will probably always be reported as unused.

I'll consider marking those as used when ext-pdo is used.

@janedbal janedbal added the enhancement New feature or request label Nov 18, 2024
@janedbal
Copy link
Member

Looks like no ext-pdo_xxx has any dedicated symbols

Hm, that is no longer true since PHP 8.4:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants