Skip to content

Commit 90ecf5a

Browse files
committed
Make the PHPCS standard self-contained
As things were, this package contained a ruleset, but did not declare its dependency on PHP_CodeSniffer, so the package would not be usable without the dependant declaring a dependency on PHPCS. This commit fixes this by: 1. Declaring PHPCS as a dependency in the `composer.json` file. 2. Declaring a dependency on the DealerDirect Composer plugin which can automatically handle the registration of PHPCS standards with PHPCS. With these two dependencies in place, the package can be used as a self-contained package. Includes adding a `.gitignore` file to prevent the `composer.lock` and `vendor` directory from being committed, as well as a `.gitattributes` file to prevent the `.gitignore` (and `.gitattributes`) file from being included in distributed packages.
1 parent b46b5cc commit 90ecf5a

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.gitattributes export-ignore
2+
.gitignore export-ignore

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vendor
2+
composer.lock

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@
1212
],
1313
"replace": {
1414
"jakub-onderka/php-code-style": "*"
15+
},
16+
"require": {
17+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
18+
"squizlabs/php_codesniffer": "^3.6.1"
1519
}
1620
}

0 commit comments

Comments
 (0)