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

cgr update kills Drupal coding standards #25

Open
uberhacker opened this issue Nov 22, 2017 · 3 comments
Open

cgr update kills Drupal coding standards #25

uberhacker opened this issue Nov 22, 2017 · 3 comments

Comments

@uberhacker
Copy link
Contributor

$ phpcs -i
The installed coding standards are Squiz, MySource, PEAR, Zend, PSR2, PSR1, Drupal and DrupalPractice
$ cgr update
>> Running: composer '--working-dir=/home/osboxes/.config/composer/global/dealerdirect/phpcodesniffer-composer-installer' 'update'
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
PHP CodeSniffer Config installed_paths delete
>> Running: composer '--working-dir=/home/osboxes/.config/composer/global/drupal/coder' 'update'
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
$ phpcs -i
The installed coding standards are Squiz, MySource, PEAR, Zend, PSR2 and PSR1
@greg-1-anderson
Copy link
Member

How do you define Drupal and DrupalPractice coding standards?

What composer command / options do you need to use to avoid update erasing this information?

@uberhacker
Copy link
Contributor Author

uberhacker commented Nov 22, 2017

I followed the instructions outlined here. The command to restore is below:

phpcs --config-set installed_paths ~/.config/composer/global/drupal/coder/vendor/drupal/coder/coder_sniffer

System information:

$ uname -a
Linux osboxes 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	LinuxMint
Description:	LMDE 2 Betsy
Release:	2
Codename:	betsy
$ cat /etc/debian_version 
8.9
$ php -v
PHP 7.0.25-1~dotdeb+8.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.25-1~dotdeb+8.1, Copyright (c) 1999-2017, by Zend Technologies
$ composer -V
Composer version 1.5.2 2017-09-11 16:59:25
$ composer global info
Changed current directory to /home/osboxes/.config/composer
consolidation/cgr 2.0.4 Safer alternative to 'composer global require'.
$ cgr info
>> Running: composer '--working-dir=/home/osboxes/.config/composer/global/dealerdirect/phpcodesniffer-composer-installer' 'info' 'dealerdirect/phpcodesniffer-composer-installer'
name     : dealerdirect/phpcodesniffer-composer-installer
descrip. : PHP_CodeSniffer Standards Composer Installer Plugin
keywords : PHPCodeSniffer, PHP_CodeSniffer, code quality, codesniffer, composer, installer, phpcs, plugin, qa, quality, standard, standards, style guide, stylecheck, tests
versions : * v0.4.3
type     : composer-plugin
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/DealerDirect/phpcodesniffer-composer-installer.git 63c0ec0ac286d31651d3c70e5bf76ad87db3ba23
dist     : [zip] https://api.github.com/repos/DealerDirect/phpcodesniffer-composer-installer/zipball/63c0ec0ac286d31651d3c70e5bf76ad87db3ba23 63c0ec0ac286d31651d3c70e5bf76ad87db3ba23
names    : dealerdirect/phpcodesniffer-composer-installer

autoload
psr-4
Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\ => src/

requires
composer-plugin-api ^1.0
php ^5.3|^7
squizlabs/php_codesniffer *

requires (dev)
composer/composer *
wimg/php-compatibility ^8.0

suggests
dealerdirect/qa-tools All the PHP QA tools you'll need
>> Running: composer '--working-dir=/home/osboxes/.config/composer/global/drupal/coder' 'info' 'drupal/coder'
name     : drupal/coder
descrip. : Coder is a library to review Drupal code.
keywords : code review, phpcs, standards
versions : * 8.2.8
type     : library
license  : GPL-2.0+
source   : [git] https://git.drupal.org/project/coder.git 6d717e1a5a5dd592ebbeaafad11746849fb52532
dist     : [zip] https://api.github.com/repos/klausi/coder/zipball/6d717e1a5a5dd592ebbeaafad11746849fb52532 6d717e1a5a5dd592ebbeaafad11746849fb52532
names    : drupal/coder

requires
php >=5.4.0
squizlabs/php_codesniffer >=2.5.1
symfony/yaml >=2.0.0

requires (dev)
phpunit/phpunit >=3.7
>> Running: composer '--working-dir=/home/osboxes/.config/composer/global/pantheon-systems/terminus' 'info' 'pantheon-systems/terminus'
name     : pantheon-systems/terminus
descrip. : A command line interface for Pantheon
keywords : cli, drupal, pantheon, terminus, wordpress
versions : * 1.6.1
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/pantheon-systems/terminus.git bdd8f3e628a883a8d3abaefe9de1ecfe48358f96
dist     : [zip] https://api.github.com/repos/pantheon-systems/terminus/zipball/bdd8f3e628a883a8d3abaefe9de1ecfe48358f96 bdd8f3e628a883a8d3abaefe9de1ecfe48358f96
names    : pantheon-systems/terminus

autoload
psr-4
Pantheon\Terminus\ => src/

requires
composer/semver ^1.4
consolidation/robo ^1.1.0
guzzlehttp/guzzle ^6.2
php >=5.5.9
psy/psysh ^0.8
symfony/console ^3.3
symfony/finder ~2.7|^3.2
symfony/yaml ~2.1|^3.2

requires (dev)
behat/behat ^3.2.2
php-vcr/php-vcr ^1.4
phpunit/phpunit ^4.0
satooshi/php-coveralls ^1.0
sebastian/phpcpd ^2.0
squizlabs/php_codesniffer ^2.7

@greg-1-anderson
Copy link
Member

Not sure what the solution is, but it looks like the composer update is overwriting the phpcs configuration.

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

2 participants