-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Invalid "installed_paths" config value #32
Comments
@Wirone Thank you for opening this issue. I will start with the second issue "Paths should contain only packages with The first problem "Paths should contain unique values" might be a result of this... I'm not sure, I will test this and get back to you. The first issue might also be caused by an upgrade of the plugin. Versions prior to v0.4.0 used absolute paths, since v0.4.0 relative paths are used on project installations and absolute paths on global installations. (See #14). An upgrade "might" cause ending up with the duplicates in your PHP_CodeSniffer configuration. |
@frenck I think you did not understand correctly, or I don't understand "root package" purpose - nevermind, I'll try to explain more. I have Symfony app where I have PS. I removed |
@Wirone The root package support is for "main" repositories that contain coding standards themself instead of a separate package. (Wordpress is having a specific use case as well, see WordPress/WordPress-Coding-Standards#855). I do see an issue and I will try to explain why this is a bug... but actually not a bug. (That's me saying: We could improve here, but that not the root cause of the problem). The actual problem is the How we could improve this plugin:
To recap: We could improve a little, the actual root cause is with |
Currently As for the "ignore ruleset in package root of non-codesniff packages" bug, I feel that should be resolved. The most straightforward approach, as far as I can see, is to add an I am inclined to view this as a bug... (apparently the scope of the finder is not limited enough). |
Any news about solving this? I think that it's also happening to me. I added in my project's {
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "*",
"jakub-onderka/php-console-highlighter": "*",
"jakub-onderka/php-parallel-lint": "*",
"infinum/coding-standards-wp": "*"
}
} Which results in Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 7 installs, 0 updates, 0 removals
- Installing squizlabs/php_codesniffer (3.1.1): Loading from cache
- Installing dealerdirect/phpcodesniffer-composer-installer (v0.4.3): Downloading (100%)
- Installing jakub-onderka/php-console-color (0.1): Loading from cache
- Installing jakub-onderka/php-console-highlighter (v0.3.2): Loading from cache
- Installing jakub-onderka/php-parallel-lint (v0.9.2): Loading from cache
- Installing wp-coding-standards/wpcs (0.13.0): Downloading (100%)
- Installing infinum/coding-standards-wp (0.2.5): Downloading (100%)
dealerdirect/phpcodesniffer-composer-installer suggests installing dealerdirect/qa-tools (All the PHP QA tools you'll need)
Writing lock file
Generating autoload files
PHP CodeSniffer Config installed_paths set to ../../../wp-content/plugins/,../../infinum/,../../wp-coding-standards/wpcs/,../../infinum/coding-standards-wp/ Infinum's coding standards composer can be seen here. Now when I run The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz, PSR1, acf-content-analysis-for-yoast-seo, coding-standards-wp, WordPress-VIP, WordPress, WordPress-Extra, WordPress-Docs, WordPress-Core and coding-standards-wp which is not right. I should get the default standards from PHPCS, WPCS and Infinum standard. Is there a fix for this, or are my post install and update scripts maybe causing this in the Infinum's coding standards? |
This issue is actually not an issue. All cases are not a match for the plugin to work with. |
@jrfnl You've unlocked the Necromancer badge! 😅 |
Problem/Motivation
Relates to v0.4.0
PHPCodeSniffer's
installed_paths
config value is set incorrectly.Two problems:
frenck/php-compatibility
is duplicated: once it's absolute, once it's relative pathphpcodesniffer-standard
type of package (../../doctrine
)Expected behaviour
Two problems:
phpcodesniffer-standard
typeActual behaviour
Steps to reproduce
Require
doctrine/doctrine-cache-bundle
in Composer.Proposed changes
Get rid of
$searchPaths = [getcwd()];
, should fix both issues.The text was updated successfully, but these errors were encountered: