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

Removal of search depth without dependency change does not update installed paths #150

Open
1 task done
jrfnl opened this issue Jan 29, 2022 · 0 comments
Open
1 task done

Comments

@jrfnl
Copy link
Member

jrfnl commented Jan 29, 2022

Problem/Motivation

The plugin updates the installed_paths when the installed dependencies have changed or the search depth has changed.

However, when the phpcodesniffer-search-depth is removed and the Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\Plugin::run() method is run, the plugin does not update the installed_paths.

So effectively, removing the phpcodesniffer-search-depth setting does not revert the search depth to the default search depth unless the installed dependencies are changed.

Discovered while working on the tests.

Expected behaviour

That the installed_paths would be updated based on the default search depth when the key is removed from extra in the composer.json file.

Actual behaviour

The installed_paths are still based on the old/removed search depth setting.

Steps to reproduce

Will follow once some "fake" (fixture) standards are in place for the tests as a standard which needs a "high" search depth is needed to demonstrate the issue and I don't know of one in the wild.

Proposed changes

To be determined

Environment

Question Answer
OS not relevant
PHP version not relevant
Composer version 2.2.5
PHP_CodeSniffer version 3.x
Dealerdirect PHPCS plugin version master
Install type not relevant

Tested against master branch?

  • I have verified the issue still exists in the master branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant