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?
Problem/Motivation
The plugin updates the
installed_pathswhen the installed dependencies have changed or the search depth has changed.However, when the
phpcodesniffer-search-depthis removed and theDealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\Plugin::run()method is run, the plugin does not update theinstalled_paths.So effectively, removing the
phpcodesniffer-search-depthsetting 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_pathswould be updated based on the default search depth when the key is removed fromextrain thecomposer.jsonfile.Actual behaviour
The
installed_pathsare 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
masterTested against
masterbranch?masterbranch.