Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from Astrotomic/php8.1
Browse files Browse the repository at this point in the history
add php8.1 support
  • Loading branch information
Gummibeer authored Oct 7, 2022
2 parents add812d + b8d9272 commit 43085b3
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 52 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,12 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: true
fail-fast: false
matrix:
php: [8.0, 7.4, 7.3, 7.2]
laravel: [9.*, 8.*, 7.*, 6.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*
- laravel: 6.*
testbench: 4.*
exclude:
- php: 7.2
laravel: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
php: [8.1, 8.0]
laravel: [9.*, 8.*]

name: P${{ matrix.php }} - L${{ matrix.laravel }}

steps:
- name: Checkout code
Expand All @@ -52,8 +39,8 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
46 changes: 23 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "astrotomic/laravel-guzzle",
"type": "library",
"description": "Laravel wrapper for guzzlehttp/guzzle",
"license": "MIT",
"type": "library",
"keywords": [
"astrotomic",
"laravel-guzzle",
Expand All @@ -10,8 +11,6 @@
"http",
"http-client"
],
"homepage": "https://astrotomic.info",
"license": "MIT",
"authors": [
{
"name": "Tom Witkowski",
Expand All @@ -20,24 +19,20 @@
"role": "Developer"
}
],
"homepage": "https://astrotomic.info",
"support": {
"email": "dev@astrotomic.info",
"issues": "https://github.com/Astrotomic/laravel-guzzle/issues",
"source": "https://github.com/Astrotomic/laravel-guzzle"
},
"require": {
"php": "^7.2 || ^8.0",
"guzzlehttp/guzzle": "^6.3 || ^7.0",
"illuminate/support": "^6.0 || ^7.0 || ^8.0|| ^9.0"
"php": "^8.0",
"guzzlehttp/guzzle": "^7.0",
"illuminate/support": "^8.0 || ^9.0"
},
"require-dev": {
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0",
"phpunit/phpunit": "^8.0 || ^9.0"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Astrotomic\\LaravelGuzzle\\GuzzleServiceProvider"
]
}
"orchestra/testbench": "^6.0 || ^7.0",
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-4": {
Expand All @@ -49,13 +44,18 @@
"Astrotomic\\LaravelGuzzle\\Tests\\": "tests"
}
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Astrotomic\\LaravelGuzzle\\GuzzleServiceProvider"
]
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
"support": {
"email": "dev@astrotomic.info",
"issues": "https://github.com/Astrotomic/laravel-guzzle/issues",
"source": "https://github.com/Astrotomic/laravel-guzzle"
}
}
14 changes: 8 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
Expand All @@ -9,15 +11,15 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
>
<testsuites>
<testsuite name="Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<coverage>
<include>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</include>
</coverage>
</phpunit>
3 changes: 3 additions & 0 deletions src/Facades/Guzzle.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@

/**
* @see GuzzleFactory
*
* @method static GuzzleClient make($baseUri = null, array $config = [])
* @method static GuzzleClient client(?string $driver = null)
* @method static GuzzleFactory extend(string $driver, Closure $callback)
* @method static GuzzleFactory register(string $identifier, array $config)
* @method static array getDrivers()
*
* @see GuzzleClientContract
*
* @method static ResponseInterface send(RequestInterface $request, array $options = [])
* @method static PromiseInterface sendAsync(RequestInterface $request, array $options = [])
* @method static ResponseInterface request(string $method, string|UriInterface $uri, array $options = [])
* @method static PromiseInterface requestAsync(string $method, string|UriInterface $uri, array $options = [])
*
* @see GuzzleClient
*
* @method static ResponseInterface get(string|UriInterface $uri, array $options = [])
* @method static ResponseInterface head(string|UriInterface $uri, array $options = [])
* @method static ResponseInterface put(string|UriInterface $uri, array $options = [])
Expand Down
5 changes: 2 additions & 3 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ class Factory extends Manager
protected $registeredConfigs = [];

/**
* @param string|UriInterface|null $baseUri
* @param array $config
*
* @param string|UriInterface|null $baseUri
* @param array $config
* @return GuzzleClient
*/
public function make($baseUri = null, array $config = []): GuzzleClient
Expand Down

0 comments on commit 43085b3

Please sign in to comment.