Skip to content

Commit 7f8eb59

Browse files
authored
Merge pull request #114 from ec-europa/feature/DQA-4440
DQA-4440: PHPunit 9.
2 parents 80ae763 + 557940e commit 7f8eb59

13 files changed

+23
-427
lines changed

.drone.yml

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
clone:
22
git:
3-
image: plugins/git:next
3+
image: registry.fpfis.eu/drone-plugins/git:next
44

55
workspace:
66
base: /test
77
path: qa-automation
88

99
matrix:
10-
COMPOSER_VERSION:
11-
- 1
12-
- 2
1310
COMPOSER_BOUNDARY:
1411
- lowest
1512
- highest
16-
PHP_VERSION:
17-
- 7.4
18-
- 8.0
19-
- 8.1
20-
13+
2114
pipeline:
2215
composer-install:
2316
group: init
24-
image: fpfis/httpd-php:${PHP_VERSION=7.3}-ci
17+
image: registry.fpfis.eu/fpfis/httpd-php:8.1-ci
2518
commands:
26-
- composer self-update --${COMPOSER_VERSION=1}
19+
- composer self-update --2
2720
- composer install --ansi --no-suggest --no-progress
2821
volumes:
2922
- /cache/${DRONE_REPO_NAME}:/cache
@@ -33,9 +26,9 @@ pipeline:
3326

3427
composer-install-lowest:
3528
group: init
36-
image: fpfis/httpd-php:${PHP_VERSION=7.3}-ci
29+
image: registry.fpfis.eu/fpfis/httpd-php:8.1-ci
3730
commands:
38-
- composer self-update --${COMPOSER_VERSION=1}
31+
- composer self-update --2
3932
- composer update --prefer-${COMPOSER_BOUNDARY=lowest} --prefer-stable --ansi --no-suggest --no-progress
4033
volumes:
4134
- /cache/${DRONE_REPO_NAME}:/cache
@@ -44,15 +37,15 @@ pipeline:
4437
COMPOSER_BOUNDARY: lowest
4538

4639
phpcs:
47-
image: fpfis/httpd-php:${PHP_VERSION=7.3}-ci
40+
image: registry.fpfis.eu/fpfis/httpd-php:8.1-ci
4841
commands:
4942
- ./vendor/bin/phpcs -p
5043
volumes:
5144
- /cache/${DRONE_REPO_NAME}:/cache
5245

5346
phpunit:
54-
image: fpfis/httpd-php:${PHP_VERSION=7.3}-ci
47+
image: registry.fpfis.eu/fpfis/httpd-php:8.1-ci
5548
commands:
56-
- ./vendor/bin/phpunit phpcs/
49+
- ./vendor/bin/phpunit
5750
volumes:
5851
- /cache/${DRONE_REPO_NAME}:/cache

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# QA Automation change log
22

3-
## Version 8.2.0
3+
## Version 9.0.0
44
DQA-4440: Drop dependency on grumphp.
55

66
## Version 8.1.8

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,18 @@ analysis and/or reviews on Drupal projects.
1414
```json
1515
{
1616
"require-dev": {
17-
"ec-europa/qa-automation": "~4.0"
17+
"ec-europa/qa-automation": "^9.0"
1818
}
1919
}
2020
```
2121

2222
### 1.2 Install with composer command
2323
```
24-
composer require --dev ec-europa/qa-automation:~4.0
24+
composer require --dev ec-europa/qa-automation:^9.0
2525
```
2626

2727
## 2. Sniff list
2828

29-
<!--- Start snifflist. -->
30-
3129
```
3230
The QualityAssurance standard contains 13 sniffs
3331
@@ -48,4 +46,7 @@ QualityAssurance (13 sniffs)
4846
QualityAssurance.InstallFiles.InstallUpdateCallbacks
4947
```
5048

51-
<!--- End snifflist. -->
49+
To update this list run:
50+
```shell
51+
./vendor/bin/phpcs -e --standard=QualityAssurance
52+
```

composer.json

+3-12
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,21 @@
1313
"code review"
1414
],
1515
"require": {
16-
"php": ">=7.3",
16+
"php": ">=8.1",
1717
"phpcompatibility/php-compatibility": "^9.1",
1818
"squizlabs/php_codesniffer": "^3.6",
1919
"drupal/coder": "^8.3",
2020
"cweagans/composer-patches": "^1.7",
2121
"composer/xdebug-handler": "^3.0",
2222
"phpmd/phpmd": "^2.10",
23-
"symfony/yaml": "^4.4 | ^5.0 | ^6.0"
23+
"symfony/yaml": "^5.0 | ^6.0"
2424
},
2525
"require-dev": {
26-
"openeuropa/task-runner": "^1.0.0-beta6",
27-
"phpunit/phpunit": "^5.7 | ^8.5.23 | ^9.0"
26+
"phpunit/phpunit": "^9.0"
2827
},
2928
"autoload": {
3029
"psr-0": {
3130
"QualityAssurance\\": "phpcs/QualityAssurance/"
32-
},
33-
"psr-4": {
34-
"EcEuropa\\QaAutomation\\": "./src/"
35-
}
36-
},
37-
"autoload-dev": {
38-
"psr-4": {
39-
"EcEuropa\\QaAutomation\\Tests\\": "./tests/"
4031
}
4132
},
4233
"extra": {

dist/library-conventions.compatible.yml

-43
This file was deleted.

dist/library-conventions.yml

-45
This file was deleted.

dist/qa-conventions.compatible.yml

-59
This file was deleted.

dist/qa-conventions.yml

-53
This file was deleted.

phpcs/QualityAssurance/Test/CoderSniffUnitTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ final public function testSniff()
132132
$this->markTestSkipped();
133133
}
134134

135+
// Simulate an assertion.
136+
$this->assertEquals('1', '1');
137+
135138
$sniffCode = Common::getSniffCode(get_class($this));
136139
list($standardName, $categoryName, $sniffName) = explode('.', $sniffCode);
137140

phpcs/QualityAssurance/Test/InfoFiles/Forbidden.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ no_forbidden_yet: true
2323
# Note: do not add the 'version' or 'project' properties yourself.
2424
# They will be added automatically by the packager on drupal.org.
2525
# version: 1.0
26-
# project: 'hello_world'
26+
# project: 'hello_world'

0 commit comments

Comments
 (0)