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

Psalm behaves like --find-dead-code is always activated #11200

Open
c-schmitz opened this issue Jan 13, 2025 · 1 comment
Open

Psalm behaves like --find-dead-code is always activated #11200

c-schmitz opened this issue Jan 13, 2025 · 1 comment

Comments

@c-schmitz
Copy link

I am using the 6.x-dev version of Psalm and scan a PHP codebase with it.

My psalm.xml looks like this:

<?xml version="1.0"?>
<psalm
    totallyTyped="false"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    errorLevel="5"
    phpVersion="8.1.30"
    sealAllMethods="true"
>
    <projectFiles>
        <directory name="commands"/>
        <directory name="components"/>
        <directory name="services"/>
        <directory name="models"/>
    </projectFiles>
</psalm>

Commandline to start psalm is

 vendor/bin/psalm --config=psalm.xml --no-cache

However, psalm emits all this errors that are related to the --find-dead-code parameter, which is not give.

for example

ERROR: PossiblyUnusedMethod - services/JoomlaIncluder.php:28:21 - Cannot find explicit calls to method app\services\JoomlaIncluder::clearSession (but did find some potential callers) (see https://psalm.dev/087)
    public function clearSession()

Any help/hint what I am doing wrong would be appreciated - or is this maybe a default switch in the development version?

Copy link

Hey @c-schmitz, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.

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

No branches or pull requests

1 participant