Skip to content

Commit a02152f

Browse files
authored
Merge pull request #4 from phpcq/feature/exec-plugin
Feature exec plugin
2 parents e845359 + d8b140a commit a02152f

File tree

6 files changed

+292
-27
lines changed

6 files changed

+292
-27
lines changed

.github/workflows/diagnostics.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ jobs:
4040
path: ~/.cache/composer
4141
key: ${{ runner.os }}-build-${{ env.cache-name }}
4242

43-
- name: Install composer dependencies
44-
run: composer install
45-
4643
- name: Cache vendor directory
4744
uses: actions/cache@v1
4845
env:
@@ -53,9 +50,6 @@ jobs:
5350
restore-keys: |
5451
${{ runner.os }}-build-${{ env.cache-name }}-
5552
56-
- name: Install phpcq toolchain
57-
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
58-
5953
- name: Cache phpcq directory
6054
uses: actions/cache@v1
6155
env:
@@ -66,6 +60,12 @@ jobs:
6660
restore-keys: |
6761
${{ runner.os }}-build-${{ env.cache-name }}-
6862
63+
- name: Install composer dependencies
64+
run: composer install
65+
66+
- name: Install phpcq toolchain
67+
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
68+
6969
- name: Run tests
7070
run: ./vendor/bin/phpcq run -v ${{ matrix.output }}
7171

.phpcq.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"plugins":{"phpunit":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/phpunit-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"phpunit":"^6.0 || ^7.0 || ^8.0 || ^9.0"}},"checksum":{"type":"sha-512","value":"c73f15658e3ba62665f09492ec91c3a6a715760bfaa88473a987538439fff442540148e086e46a6aa18ce55a3ea2fbf76caaa581384cb84a38859fcc609ae7e4"},"tools":{"phpunit":{"version":"9.5.10","url":"https://phar.phpunit.de/phpunit-9.5.10.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-xml":"*","ext-xmlwriter":"*"}},"checksum":{"type":"sha-256","value":"a34b9db21de3e75ba2e609e68a4da94633f4a99cad8413fd3731a2cd9aa08ca8"},"signature":"https://phar.phpunit.de/phpunit-9.5.10.phar.asc"}}},"psalm":{"api-version":"1.0.0","version":"1.0.1.0","type":"php-file","url":"https://phpcq.github.io/repository/psalm-1.0.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"psalm":"^3.0 || ^4.0"}},"checksum":{"type":"sha-512","value":"fb591fbea784d65ea1b63ba597616c2dd6346958a61a9129aacf612e0deaa14c0de33d9a37cf81b5ed717f09cc3f1280149a0d46576fc838241070176710675f"},"tools":{"psalm":{"version":"4.12.0","url":"https://github.com/vimeo/psalm/releases/download/4.12.0/psalm.phar","requirements":{"php":{"php":"^7.1|^8","ext-SimpleXML":"*","ext-ctype":"*","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-tokenizer":"*"}},"checksum":null,"signature":"https://github.com/vimeo/psalm/releases/download/4.12.0/psalm.phar.asc"}}},"composer-require-checker":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/composer-require-checker-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"composer-require-checker":"^3.0 | ^2.0"}},"checksum":{"type":"sha-512","value":"39507e83aee0cad92c00dcb4c755bd39c1a9157bbd919e2092aaf81b02bc5a84693335d8f3a73427e66c08c12ff81e35ed4be2d05ff33f2d368229c220a1307a"},"tools":{"composer-require-checker":{"version":"3.5.1","url":"https://github.com/maglnet/ComposerRequireChecker/releases/download/3.5.1/composer-require-checker.phar","requirements":{"php":{"php":"^7.4 || ^8.0","ext-json":"*","ext-phar":"*"}},"checksum":null,"signature":"https://github.com/maglnet/ComposerRequireChecker/releases/download/3.5.1/composer-require-checker.phar.asc"}}},"phpmd":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/phpmd-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpmd":"^2.6.1"}},"checksum":{"type":"sha-512","value":"72962e365ac6e8e47849d0b046d304c4eb4902479e0f7461e2ebe7705fc43acbbdb1dc9e483ac8c90c2636fa9a980288c82bcb3a958dae9845be2e25574f71e1"},"tools":{"phpmd":{"version":"2.10.2","url":"https://github.com/phpmd/phpmd/releases/download/2.10.2/phpmd.phar","requirements":{"php":{"php":">=5.3.9","ext-xml":"*"}},"checksum":null,"signature":null}}},"phpcpd":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/phpcpd-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcpd":"^6.0"}},"checksum":{"type":"sha-512","value":"1189ce0bf3fade4cb4241f1d96f915ef8fc7651f4450dc79fdf464ee3d6be3009316f0d423ce2d4af9d76ad50807b7fdf4d77bfa6d9ee2c91d6eda32ea214433"},"tools":{"phpcpd":{"version":"6.0.3","url":"https://phar.phpunit.de/phpcpd-6.0.3.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*"}},"checksum":{"type":"sha-256","value":"2cbaea7cfda1bb4299d863eb075e977c3f49055dd16d88529fae5150d48a84cb"},"signature":"https://phar.phpunit.de/phpcpd-6.0.3.phar.asc"}}},"phploc":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/phploc-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*","ext-json":"*"},"tool":{"phploc":"^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"}},"checksum":{"type":"sha-512","value":"f67b02d494796adf553cb3dd13ec06c1cb8e53c799954061749424251379541637538199afb3afa3c7a01cabd1cb6f1c53eb621f015dff9644c6c7cbf10c56d1"},"tools":{"phploc":{"version":"7.0.2","url":"https://phar.phpunit.de/phploc-7.0.2.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*"}},"checksum":{"type":"sha-256","value":"3d59778ec86faf25fd00e3a329b2f9ad4a3c751ca91601ea7dab70f887b0bf46"},"signature":"https://phar.phpunit.de/phploc-7.0.2.phar.asc"}}},"phpcs":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/phpcs-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcs":"^3.0 || ^2.0","phpcbf":"^3.0 || ^2.0"}},"checksum":{"type":"sha-512","value":"e4f77d34c59ec8798d93492aa1e13e5221273963f108d32add1113bb1df713a1fe415f2c4e1faf3ab44c1a506d35a7bb73981fd8b6959cff1da7c2dc6d470de1"},"tools":{"phpcs":{"version":"3.6.1","url":"https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.6.1/phpcs.phar","requirements":{"php":{"php":">=5.4.0","ext-tokenizer":"*","ext-xmlwriter":"*","ext-simplexml":"*"}},"checksum":null,"signature":"https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.6.1/phpcs.phar.asc"},"phpcbf":{"version":"3.6.1","url":"https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.6.1/phpcbf.phar","requirements":{"php":{"php":">=5.4.0","ext-tokenizer":"*","ext-xmlwriter":"*","ext-simplexml":"*"}},"checksum":null,"signature":"https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.6.1/phpcbf.phar.asc"}}},"composer-normalize":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/composer-normalize-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"composer-normalize":"^2.1"}},"checksum":{"type":"sha-512","value":"0a84b8656028b285000fa75d1f0e19a5efb156a9a738f4d41a738edb093ea8b5c392875b1167b8dbe4f644de09d6b2dfe1c39ca98f9f741dbcef2127a6f5e448"},"tools":{"composer-normalize":{"version":"2.15.0","url":"https://github.com/ergebnis/composer-normalize/releases/download/2.15.0/composer-normalize.phar","requirements":{"php":{"php":"^7.2 || ^8.0"}},"checksum":null,"signature":"https://github.com/ergebnis/composer-normalize/releases/download/2.15.0/composer-normalize.phar.asc"}}}},"tools":[]}
1+
{"plugins":{"phpunit":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/phpunit-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"phpunit":"^6.0 || ^7.0 || ^8.0 || ^9.0"}},"checksum":{"type":"sha-512","value":"c73f15658e3ba62665f09492ec91c3a6a715760bfaa88473a987538439fff442540148e086e46a6aa18ce55a3ea2fbf76caaa581384cb84a38859fcc609ae7e4"},"tools":{"phpunit":{"version":"9.5.10","url":"https://phar.phpunit.de/phpunit-9.5.10.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-xml":"*","ext-xmlwriter":"*"}},"checksum":{"type":"sha-256","value":"a34b9db21de3e75ba2e609e68a4da94633f4a99cad8413fd3731a2cd9aa08ca8"},"signature":"https://phar.phpunit.de/phpunit-9.5.10.phar.asc"}}},"psalm":{"api-version":"1.0.0","version":"1.0.1.0","type":"php-file","url":"https://phpcq.github.io/repository/psalm-1.0.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"psalm":"^3.0 || ^4.0"}},"checksum":{"type":"sha-512","value":"fb591fbea784d65ea1b63ba597616c2dd6346958a61a9129aacf612e0deaa14c0de33d9a37cf81b5ed717f09cc3f1280149a0d46576fc838241070176710675f"},"tools":{"psalm":{"version":"v4.15.0","url":"https://github.com/vimeo/psalm/releases/download/v4.15.0/psalm.phar","requirements":{"php":{"php":"^7.1|^8","ext-SimpleXML":"*","ext-ctype":"*","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-tokenizer":"*"}},"checksum":null,"signature":"https://github.com/vimeo/psalm/releases/download/v4.15.0/psalm.phar.asc"}}},"composer-require-checker":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/composer-require-checker-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"composer-require-checker":"^3.0 | ^2.0"}},"checksum":{"type":"sha-512","value":"39507e83aee0cad92c00dcb4c755bd39c1a9157bbd919e2092aaf81b02bc5a84693335d8f3a73427e66c08c12ff81e35ed4be2d05ff33f2d368229c220a1307a"},"tools":{"composer-require-checker":{"version":"3.8.0","url":"https://github.com/maglnet/ComposerRequireChecker/releases/download/3.8.0/composer-require-checker.phar","requirements":{"php":{"php":"^7.4 || ^8.0","ext-json":"*","ext-phar":"*"}},"checksum":null,"signature":"https://github.com/maglnet/ComposerRequireChecker/releases/download/3.8.0/composer-require-checker.phar.asc"}}},"phpmd":{"api-version":"1.0.0","version":"1.0.1.0","type":"php-file","url":"https://phpcq.github.io/repository/phpmd-1.0.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpmd":"^2.6.1"}},"checksum":{"type":"sha-512","value":"88e267b9c36b2edc85e924717606b626e005ac8d97b1f65f5331e2a3b3894dec2cf124f6187541bf759d026477b6d94daacc5d5c81bb09714a68ffabe5698dc5"},"tools":{"phpmd":{"version":"2.11.0","url":"https://github.com/phpmd/phpmd/releases/download/2.11.0/phpmd.phar","requirements":{"php":{"php":">=5.3.9","ext-xml":"*"}},"checksum":null,"signature":null}}},"phpcpd":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/phpcpd-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcpd":"^6.0"}},"checksum":{"type":"sha-512","value":"1189ce0bf3fade4cb4241f1d96f915ef8fc7651f4450dc79fdf464ee3d6be3009316f0d423ce2d4af9d76ad50807b7fdf4d77bfa6d9ee2c91d6eda32ea214433"},"tools":{"phpcpd":{"version":"6.0.3","url":"https://phar.phpunit.de/phpcpd-6.0.3.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*"}},"checksum":{"type":"sha-256","value":"2cbaea7cfda1bb4299d863eb075e977c3f49055dd16d88529fae5150d48a84cb"},"signature":"https://phar.phpunit.de/phpcpd-6.0.3.phar.asc"}}},"phploc":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/phploc-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*","ext-json":"*"},"tool":{"phploc":"^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"}},"checksum":{"type":"sha-512","value":"f67b02d494796adf553cb3dd13ec06c1cb8e53c799954061749424251379541637538199afb3afa3c7a01cabd1cb6f1c53eb621f015dff9644c6c7cbf10c56d1"},"tools":{"phploc":{"version":"7.0.2","url":"https://phar.phpunit.de/phploc-7.0.2.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*"}},"checksum":{"type":"sha-256","value":"3d59778ec86faf25fd00e3a329b2f9ad4a3c751ca91601ea7dab70f887b0bf46"},"signature":"https://phar.phpunit.de/phploc-7.0.2.phar.asc"}}},"phpcs":{"api-version":"1.0.0","version":"1.0.1.0","type":"php-file","url":"https://phpcq.github.io/repository/phpcs-1.0.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcs":"^3.0 || ^2.0","phpcbf":"^3.0 || ^2.0"}},"checksum":{"type":"sha-512","value":"f49504ac6573c6e2fa3584935bc3b516b0c358756aecc80eb3fda944ba8f47e2cd0129ffe73b8015efdffca0e5e747c86fc2e552f4d09469e5e538eb78842694"},"tools":{"phpcs":{"version":"3.6.1","url":"https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.6.1/phpcs.phar","requirements":{"php":{"php":">=5.4.0","ext-tokenizer":"*","ext-xmlwriter":"*","ext-simplexml":"*"}},"checksum":null,"signature":"https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.6.1/phpcs.phar.asc"},"phpcbf":{"version":"3.6.1","url":"https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.6.1/phpcbf.phar","requirements":{"php":{"php":">=5.4.0","ext-tokenizer":"*","ext-xmlwriter":"*","ext-simplexml":"*"}},"checksum":null,"signature":"https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.6.1/phpcbf.phar.asc"}}},"composer-normalize":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/composer-normalize-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"composer-normalize":"^2.1"}},"checksum":{"type":"sha-512","value":"0a84b8656028b285000fa75d1f0e19a5efb156a9a738f4d41a738edb093ea8b5c392875b1167b8dbe4f644de09d6b2dfe1c39ca98f9f741dbcef2127a6f5e448"},"tools":{"composer-normalize":{"version":"2.17.0","url":"https://github.com/ergebnis/composer-normalize/releases/download/2.17.0/composer-normalize.phar","requirements":{"php":{"php":"^7.2 || ^8.0"}},"checksum":null,"signature":"https://github.com/ergebnis/composer-normalize/releases/download/2.17.0/composer-normalize.phar.asc"}}}},"tools":[]}

.phpcq.yaml.dist

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ phpcq:
5353

5454
tasks:
5555
fix:
56-
- composer-normalize
57-
- phpcbf
56+
- fix-composer-normalize
57+
- fix-phpcs
5858
verify:
5959
- composer-require-checker
6060
- composer-normalize
@@ -66,14 +66,8 @@ tasks:
6666
- psalm
6767
- phpunit
6868
default:
69-
- composer-require-checker
70-
- composer-normalize
71-
- phploc
72-
- phpcpd
73-
- phpmd
74-
- phpcs
75-
- psalm
76-
- phpunit
69+
- verify
70+
- analyze
7771

7872
phpmd:
7973
config:
@@ -93,11 +87,16 @@ tasks:
9387
config: &phpcs-config
9488
standard: PSR12
9589

96-
phpcbf:
90+
fix-phpcs:
9791
plugin: phpcs
9892
config:
9993
<<: *phpcs-config
10094
fix: true
10195

96+
fix-composer-normalize:
97+
plugin: composer-normalize
98+
config:
99+
dry_run: false
100+
102101
phpcpd:
103102
config:

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "phpcq/plugin-phpcs",
3-
"type": "phpcq-plugin",
43
"description": "phpcs/phpcbf plugin for phpcq.",
54
"license": "MIT",
5+
"type": "phpcq-plugin",
66
"authors": [
77
{
88
"name": "Christian Schiffler",
@@ -19,6 +19,7 @@
1919
],
2020
"require": {
2121
"php": "^7.3 || ^8.0",
22+
"ext-pcre": "*",
2223
"phpcq/plugin-api": "^1.0@dev"
2324
},
2425
"require-dev": {

composer.lock

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)