Skip to content

Commit

Permalink
Allow installation with PHP 8.x (#9)
Browse files Browse the repository at this point in the history
* Allow installation with PHP 8.x

* Update .travis.yml

* Update composer.json

* Modernize dev dependencies

* Update .travis.yml
  • Loading branch information
JeroenDeDauw committed Jan 15, 2021
1 parent ad599e7 commit ead8ef8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 47 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

!.*
.idea/
.phpunit.result.cache

composer.phar
composer.lock
Expand Down
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
language: php

php:
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'

install:
- travis_retry composer install
Expand All @@ -15,7 +13,7 @@ script:
- make ci

after_success:
- if [[ "`phpenv version-name`" != "7.3" ]]; then exit 0; fi
- if [[ "`phpenv version-name`" != "7.4" ]]; then exit 0; fi
- vendor/bin/phpunit --coverage-clover coverage.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ The message reporter specifies `MessageReporter` and `MessageReporterAware` as a
use Onoi\MessageReporter\MessageReporterFactory;
use Onoi\MessageReporter\MessageReporterAware;
use Onoi\MessageReporter\MessageReporterAwareTrait;
use Onoi\MessageReporter\MessageReporter;

class Bar implements MessageReporterAware {

Expand Down Expand Up @@ -113,6 +112,10 @@ You can also invoke PHPUnit directly to pass it arguments, as follows

## Release notes

* 1.4.2 (2021-01-15)
- Added support for PHP 8
- Changed minimum PHP version to 7.3

* 1.4.1 (2019-04-10)
- Added `.gitattributes`

Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
}
],
"require": {
"php": "^5.6.99|^7.0"
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^6.5.14",
"phpunit/phpunit": "^9.5",
"ockcyp/covers-validator": "~1.1",
"squizlabs/php_codesniffer": "~3.3",
"slevomat/coding-standard": "^3.0|~4.5",
"mediawiki/mediawiki-codesniffer": "~23.0",
"phpstan/phpstan": "~0.9.2"
"mediawiki/mediawiki-codesniffer": "~34.0",
"phpstan/phpstan": "~0.12.67"
},
"extra": {
"branch-alias": {
Expand Down
37 changes: 0 additions & 37 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,43 +140,6 @@
<exclude name="PEAR.Functions.FunctionCallSignature.OpeningIndent" />
</rule>

<!-- Using 3rd party sniff while Squiz isn't there, yet. https://github.com/squizlabs/PHP_CodeSniffer/issues/911 -->
<rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DeclareStrictTypesSniff.php" />
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2" />
<property name="spacesCountAroundEqualsSign" value="1" />
</properties>
</rule>

<rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/ReturnTypeHintSpacingSniff.php" />

<rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/TypeHintDeclarationSniff.php">
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversablePropertyTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingPropertyTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessDocComment" />
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
<properties>
<property name="usefulAnnotations" type="array" value="
@see,
@throws,
@dataProvider,
@slowThreshold,
@noinspection
"/>
<property name="enableVoidTypeHint" value="false" />
</properties>
</rule>

<rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Namespaces/UseDoesNotStartWithBackslashSniff.php" />

<rule ref="MediaWiki.WhiteSpace.DisallowEmptyLineFunctions">
<exclude name="MediaWiki.WhiteSpace.DisallowEmptyLineFunctions.NoEmptyLine" />
<exclude name="MediaWiki.WhiteSpace.SpaceAfterClosure.NoWhitespaceAfterClosure" />
Expand Down

0 comments on commit ead8ef8

Please sign in to comment.