Skip to content

Commit

Permalink
Merge pull request #32 from gregurco/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies, switch to github actions
  • Loading branch information
gregurco committed Apr 7, 2024
2 parents c1ba192 + e73ce6f commit a58a99b
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 63 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -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
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
4 changes: 4 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
>
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
</php>

<testsuites>
<testsuite name="GuzzleBundleOAuth2Plugin Test Suite">
<directory>./tests</directory>
Expand Down
6 changes: 1 addition & 5 deletions src/DependencyInjection/GuzzleBundleOAuth2Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand Down
2 changes: 1 addition & 1 deletion tests/GuzzleBundleOAuth2PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit a58a99b

Please sign in to comment.