You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say you have a project in which you require both a project specific coding standard, such as the Joomla or WordPress Coding Standards, as well as the PHPCompatibility standard to check for cross-version compatibility issues.
Assume that both these PHPCS standards require this library and have their type set to phpcodesniffer-standard,
How does this installer handle that ?
PHPCS by default overwrites a previously registered installed_path when the command is run again.
Does this library collect all the paths and run the command once at the end ? Or would each subsequent CS dependency overwrite the path like PHPCS does ?
@Potherca Thanks for the clarification. One more question: what about if the user installs the sniff library as "global" using Composer and they already have one or more other standards installed globally ? (which they're not updating at the same time)
The behaviour between "global" or "local" install is the same.
If a sniff is already installed before the installer is installed, the installer does not do anything when it is installed (as the sniff is already installed and no installation is needed).
However, when another sniff is installed after the installer has been installed, both sniffs will be installed by the installer.
I have updated and expanded the working example to including these scenario's (both the incremental scenario and the global scenario).
Question
Say you have a project in which you require both a project specific coding standard, such as the Joomla or WordPress Coding Standards, as well as the PHPCompatibility standard to check for cross-version compatibility issues.
Assume that both these PHPCS standards require this library and have their
type
set tophpcodesniffer-standard
,How does this installer handle that ?
PHPCS by default overwrites a previously registered
installed_path
when the command is run again.Does this library collect all the paths and run the command once at the end ? Or would each subsequent CS dependency overwrite the path like PHPCS does ?
Related: squizlabs/PHP_CodeSniffer#1436
The text was updated successfully, but these errors were encountered: