Skip to content

Commit 9d3d5aa

Browse files
committed
Tests for PHP8 & dependency upgrade
1 parent 7c7f530 commit 9d3d5aa

7 files changed

Lines changed: 39 additions & 28 deletions

File tree

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ env:
22
global:
33
- CC_TEST_REPORTER_ID=5a4b76842bd20fccbb5e141c996a607c6de0287f1f98829c8f203998f3c5f922
44
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
5+
- XDEBUG_MODE=coverage
56
language: php
67
php:
78
- '7.2'
89
- '7.3'
910
- '7.4'
11+
- '8.0'
1012

1113
before_script:
1214
- composer self-update

composer.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
"mockery/mockery": "^1.0"
3131
},
3232
"config": {
33-
"sort-packages": false,
34-
"platform": {
35-
"php": "7.2.5"
36-
}
33+
"sort-packages": false
3734
},
3835
"autoload": {
3936
"psr-4": {
@@ -48,10 +45,10 @@
4845
},
4946
"scripts": {
5047
"phpstan": "vendor/bin/phpstan analyse",
48+
"phpstan_full": "vendor/bin/phpstan clear-result-cache && vendor/bin/phpstan analyse",
5149
"phpstan_base": "vendor/bin/phpstan analyse --generate-baseline",
52-
"phpstan_clear": "vendor/bin/phpstan clear-result-cache",
5350
"psalm": "vendor/bin/psalm --show-info=false",
54-
"psalm_full": "vendor/bin/psalm --show-info=false",
51+
"psalm_full": "vendor/bin/psalm --clear-cache && vendor/bin/psalm --show-info=false",
5552
"psalm_base": "vendor/bin/psalm --set-baseline=psalm-baseline.xml",
5653
"phpunit": "vendor/bin/phpunit --colors=always",
5754
"phpunit_clover": "vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml",

phpunit.xml.dist

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
6-
backupGlobals="false"
7-
colors="true"
8-
bootstrap="vendor/autoload.php"
9-
>
10-
<testsuites>
11-
<testsuite name="Unit Tests">
12-
<directory>tests</directory>
13-
</testsuite>
14-
</testsuites>
15-
16-
<filter>
17-
<whitelist>
18-
<directory suffix=".php">src</directory>
19-
</whitelist>
20-
</filter>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">src</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="Unit Tests">
10+
<directory>tests</directory>
11+
</testsuite>
12+
</testsuites>
2113
</phpunit>

psalm-baseline.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="3.18.2@19aa905f7c3c7350569999a93c40ae91ae4e1626">
2+
<files psalm-version="4.3.1@2feba22a005a18bf31d4c7b9bdb9252c73897476">
33
<file src="examples/Address.php">
44
<MissingConstructor occurrences="3">
55
<code>$city</code>

ruleset.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,24 @@
3737
</properties>
3838
</rule>
3939
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment"/>
40+
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
41+
<rule ref="SlevomatCodingStandard.Functions.StrictCall"/>
42+
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
43+
<rule ref="SlevomatCodingStandard.PHP.DisallowReference"/>
44+
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
45+
<rule ref="SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable"/>
46+
<rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses"/>
47+
<rule ref="SlevomatCodingStandard.Functions.DisallowEmptyFunction"/>
48+
<!--<rule ref="SlevomatCodingStandard.Functions.TrailingCommaInCall"/>-->
49+
<rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
50+
<rule ref="SlevomatCodingStandard.PHP.ShortList"/>
51+
<rule ref="SlevomatCodingStandard.PHP.TypeCast"/>
52+
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
53+
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
54+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
55+
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing"/>
56+
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
57+
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
58+
<rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants"/>
59+
<rule ref="SlevomatCodingStandard.Classes.UselessLateStaticBinding"/>
4060
</ruleset>

vendor-bin/phpcs/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
33
"squizlabs/php_codesniffer": "^3.5",
4-
"slevomat/coding-standard": "^5.0"
4+
"slevomat/coding-standard": "^6.0"
55
}
66
}

vendor-bin/psalm/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"vimeo/psalm": "^3.7"
3+
"vimeo/psalm": "^4.0"
44
}
55
}

0 commit comments

Comments
 (0)