diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml
new file mode 100644
index 0000000..c60db87
--- /dev/null
+++ b/.github/workflows/phpunit.yml
@@ -0,0 +1,53 @@
+name: PHPUnit
+
+on:
+ pull_request:
+ push:
+ branches: [ master ]
+
+jobs:
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest]
+ php:
+ - '7.2'
+ - '8.3'
+ symfony:
+ - '5.0.*'
+ - '5.4.*' # LTS
+ - '6.0.*'
+ - '7.0.*'
+ exclude:
+ - php: '7.2'
+ symfony: '6.0.*' # requires PHP >=8.1
+ - php: '7.2'
+ symfony: '7.0.*' # requires PHP >=8.2
+
+ runs-on: ${{ matrix.os }}
+
+ env:
+ SYMFONY: ${{ matrix.symfony }}
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ ini-values: date.timezone='UTC'
+ tools: composer:v2
+
+ - name: Require symfony
+ run: composer --no-update require symfony/symfony:"${SYMFONY}"
+
+ - name: Install dependencies
+ run: |
+ composer update
+ vendor/bin/simple-phpunit install
+ - name: Test
+ run: |
+ composer validate --strict --no-check-lock
+ vendor/bin/simple-phpunit --coverage-text --verbose
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index e5703f4..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-language: php
-
-sudo: false
-
-php:
- - 7.1
- - 7.2
- - 7.3
- - 7.4
- - nightly
-
-env:
- - SYMFONY_VERSION=4.1.* # (until 07/2019)
- - SYMFONY_VERSION=4.2.* # (until 01/2020)
- - SYMFONY_VERSION=4.3.* # (until 07/2020)
- - SYMFONY_VERSION=4.4.* # LTS (11/2019, until 11/2023)
- - SYMFONY_VERSION=5.0.* # (until 07/2020)
- - DEPENDENCIES=dev
-
-cache:
- directories:
- - $HOME/.composer/cache/files
-
-before_install:
- - composer self-update
- - if [ "$DEPENDENCIES" == "dev" ]; then composer config minimum-stability $DEPENDENCIES; fi;
- - if [ "$SYMFONY_VERSION" != "" ]; then composer --no-update require symfony/symfony:${SYMFONY_VERSION}; fi;
-
-install:
- - composer update
-
-script:
- - composer validate --strict --no-check-lock
- - vendor/bin/phpunit --coverage-text --verbose
-
-after_success:
- - travis_retry php vendor/bin/php-coveralls
-
-matrix:
- exclude:
- - php: 7.1
- env: SYMFONY_VERSION=5.0.* # requires PHP ^7.2.5
- allow_failures:
- - env: DEPENDENCIES=dev
- - php: nightly
-
-notifications:
- email:
- - "gregurco.vlad@gmail.com"
diff --git a/README.md b/README.md
index 27b9120..5d678c5 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ This plugin integrates [OAuth2][1] functionality into [Guzzle Bundle][2], a bund
----
## Prerequisites
- - PHP 7.1 or above
+ - PHP 7.2 or above
- [Guzzle Bundle][2]
- [guzzle-oauth2-plugin][3]
diff --git a/composer.json b/composer.json
index e040b8e..cfeecb8 100644
--- a/composer.json
+++ b/composer.json
@@ -18,18 +18,18 @@
],
"require": {
- "php": "^7.1|^8.0",
- "guzzlehttp/guzzle": "^6.0|^7.0",
+ "php": ">=7.2",
+ "guzzlehttp/guzzle": "^6.5.8|^7.4.5",
"eightpoints/guzzle-bundle": "^8.0",
- "symfony/http-kernel": "^4.0|^5.0|^6.0",
- "symfony/config": "^4.0|^5.0|^6.0",
- "symfony/dependency-injection": "^4.0|^5.0|^6.0",
- "symfony/expression-language": "^4.0|^5.0|^6.0",
+ "symfony/http-kernel": "~5.0|~6.0|~7.0",
+ "symfony/config": "~5.0|~6.0|~7.0",
+ "symfony/dependency-injection": "~5.0|~6.0|~7.0",
+ "symfony/expression-language": "~5.0|~6.0|~7.0",
"sainsburys/guzzle-oauth2-plugin": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.5",
+ "symfony/phpunit-bridge": "~5.0|~6.0|~7.0",
"php-coveralls/php-coveralls": "^2.2"
},
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 14c4231..abb5dbd 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -5,6 +5,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
>
+
+
+
+
./tests
diff --git a/src/DependencyInjection/GuzzleBundleOAuth2Extension.php b/src/DependencyInjection/GuzzleBundleOAuth2Extension.php
index ebc9f57..b9954f9 100644
--- a/src/DependencyInjection/GuzzleBundleOAuth2Extension.php
+++ b/src/DependencyInjection/GuzzleBundleOAuth2Extension.php
@@ -9,11 +9,7 @@
class GuzzleBundleOAuth2Extension extends Extension
{
- /**
- * @param array $configs
- * @param ContainerBuilder $container
- */
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
diff --git a/tests/GuzzleBundleOAuth2PluginTest.php b/tests/GuzzleBundleOAuth2PluginTest.php
index 497bf36..447b816 100644
--- a/tests/GuzzleBundleOAuth2PluginTest.php
+++ b/tests/GuzzleBundleOAuth2PluginTest.php
@@ -180,7 +180,7 @@ public function testAddConfigurationWithData(array $pluginConfiguration) : void
$processor = new Processor();
$processedConfig = $processor->processConfiguration(new Configuration('eight_points_guzzle', false, [new GuzzleBundleOAuth2Plugin()]), $config);
- $this->assertInternalType('array', $processedConfig);
+ $this->assertIsArray($processedConfig);
}
/**