Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies, switch to github actions #32

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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