Composer :  PHP 환경에서 사용하는 의존성 관리 도구

설치 => https://getcomposer.org/download/



C:\Users\Administrator>composer


Composer version 1.6.4 2018-04-13 12:04:24

Usage: command [options] [arguments]

Options:

  -h, --help                     Display this help message

  -q, --quiet                    Do not output any message

  -V, --version                  Display this application version

      --ansi                     Force ANSI output

      --no-ansi                  Disable ANSI output

  -n, --no-interaction           Do not ask any interactive question

      --profile                  Display timing and memory usage information

      --no-plugins               Whether to disable plugins.


c:\APMorg\Apache24\htdocs>composer global require squizlabs/php_codesniffer

Changed current directory to C:/Users/Administrator/AppData/Roaming/Composer

Using version ^3.2 for squizlabs/php_codesniffer

./composer.json has been created

Loading composer repositories with package information

Updating dependencies (including require-dev)

Package operations: 1 install, 0 updates, 0 removals

  - Installing squizlabs/php_codesniffer (3.2.3): Downloading (100%)

Writing lock file

Generating autoload files


c:\APMorg\Apache24\htdocs>



C:\APMorg\Apache24\htdocs>composer require --dev squizlabs/php_codesniffer

Using version ^3.2 for squizlabs/php_codesniffer

./composer.json has been created

Loading composer repositories with package information

Updating dependencies (including require-dev)

Package operations: 1 install, 0 updates, 0 removals

  - Installing squizlabs/php_codesniffer (3.2.3): Loading from cache

Writing lock file

Generating autoload files





vscode-phpcs(composer based)를 적용했더니 
내 코드가 마음에 안드나 보다
30개가 문제있다 나오네...
There must be...
invalid...

phpcs(composer based) 상세 내용은 사용해 보면서 이 글에 업데이트 하는걸로 하겠습니다.




phpcs에서 invalid라 warning하는 건

주석 / 문법오류 / 함수사용시 패턴 / 들여쓰기등을 가이드 해주면서 일괄적인 코딩패턴을 유지할 수 있게 해준다. warning없애려고 하다보니 코드가 깔끔해졌다. => 가독성 좋아짐

참고 ) 주석관련 : https://github.com/squizlabs/PHP_CodeSniffer/issues/258







'프로그래밍 > 확장' 카테고리의 다른 글

Composer 설치 : vscode-phpcs(composer based)  (0) 2018.04.15

+ Recent posts