Skip to content

Commit

Permalink
Update paysera/lib-normalization to support PHP 8.0 (#4)
Browse files Browse the repository at this point in the history
* Add support for PHP 8.0
* Removed (temporary) paysera/lib-php-cs-fixer-config

Co-authored-by: Doncho Toromanov <[email protected]>
  • Loading branch information
Doncho Toromanov and Doncho Toromanov authored Mar 14, 2022
1 parent 62e99bb commit b33a221
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 36 deletions.
9 changes: 0 additions & 9 deletions .php_cs

This file was deleted.

8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ matrix:
- php: 7.2
env: COMPOSER_ARGS=""
- php: 7.3
env: COMPOSER_ARGS="" WITH_CS="true"
env: COMPOSER_ARGS=""
- php: 8.0
env: COMPOSER_ARGS=""

- php: 7.0
env: COMPOSER_ARGS="--prefer-lowest"
Expand All @@ -25,6 +27,8 @@ matrix:
env: COMPOSER_ARGS="--prefer-lowest"
- php: 7.3
env: COMPOSER_ARGS="--prefer-lowest"
- php: 8.0
env: COMPOSER_ARGS="--prefer-lowest"

cache:
directories:
Expand All @@ -39,4 +43,4 @@ before_script:

script:
- bin/phpunit
- if [[ "$WITH_CS" == "true" ]]; then bin/paysera-php-cs-fixer fix --config=.php_cs -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection "${COMMIT_SCA_FILES[@]}"; fi

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0]
### Added
- Support from PHP 8.0

### Removed
- Removed (temporary) paysera/lib-php-cs-fixer-config

## [1.1.0]
### Added
- `NormalizationContext::markNullValuesForRemoval` method to be called in normalizers.
Expand Down
11 changes: 4 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
}
},
"require": {
"php": "^7.0",
"paysera/lib-object-wrapper": "^0.2.0"
"php": "^7.0 || ^8.0",
"paysera/lib-object-wrapper": "^0.3.0"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"paysera/lib-php-cs-fixer-config": "^2.2.2",
"phpunit/phpunit": "^6.5 || ^9.0",
"mockery/mockery": "^1.2",
"ext-json": "*"
},
Expand All @@ -28,8 +27,6 @@
},
"scripts": {
"phpunit": "phpunit",
"fix-cs": "paysera-php-cs-fixer fix",
"test-cs": "paysera-php-cs-fixer fix --dry-run -v",
"test": ["@phpunit", "@test-cs"]
"test": ["@phpunit"]
}
}
32 changes: 14 additions & 18 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false" backupStaticAttributes="false"
colors="true" convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php">

bootstrap="vendor/autoload.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<testsuites>
<testsuite>
<testsuite name="Normalization library">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<coverage>
<include>
<directory>./</directory>
<exclude>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
</include>
<exclude>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</coverage>
</phpunit>

0 comments on commit b33a221

Please sign in to comment.