Skip to content

Commit

Permalink
Merge pull request #34 from fruitl00p/feature/support-php8
Browse files Browse the repository at this point in the history
feat: Support PHP8+
  • Loading branch information
JKetelaar authored Nov 17, 2022
2 parents 901628a + 579b23b commit 2494317
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 41 deletions.
11 changes: 7 additions & 4 deletions .php-cs.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)

declare(strict_types=1);

$config = new PhpCsFixer\Config();
$config ->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'full_opening_tag' => true,
Expand All @@ -15,5 +18,5 @@
->setFinder(PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__ . '/src')
)
;
);
return $config;
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ php:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1

before_script:
- travis_retry composer self-update
Expand Down
15 changes: 5 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,17 @@
"homepage": "https://github.com/JKetelaar/PHP-Kiyoh-API",
"license": "GPL-3.0+",
"require": {
"php": "~7.1",
"guzzlehttp/guzzle": "^6.2",
"ext-simplexml": "*"
"php": "~7.3 || ^8.0",
"ext-simplexml": "*",
"guzzlehttp/guzzle": "^6.2"
},
"require-dev": {
"phpunit/phpunit": "7",
"friendsofphp/php-cs-fixer": "^2.16"
"friendsofphp/php-cs-fixer": "^2.16",
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-0": {
"JKetelaar": "src/"
}
},
"config": {
"platform": {
"php": "7.1"
}
}
}
46 changes: 19 additions & 27 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="KiyOh API Client test suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/coverage.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="build/logs/coverage.xml"/>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>
<testsuites>
<testsuite name="KiyOh API Client test suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
</phpunit>

0 comments on commit 2494317

Please sign in to comment.