Skip to content

Commit

Permalink
Bumped versions
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Mar 6, 2023
1 parent 3d27dbf commit 208c4a9
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 43 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,30 @@ on:
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: composer:2.1
php-version: '8.1'
tools: composer:v2
coverage: none
env:
update: true

- name: Install Dependencies
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --no-interaction --no-progress

- name: Install PHPStan
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
Expand All @@ -39,28 +41,30 @@ jobs:

psalm:
name: Psalm
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: composer:2.1
php-version: '8.1'
tools: composer:v2
coverage: none
env:
update: true

- name: Install Dependencies
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --no-interaction --no-progress

- name: Install Psalm
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,37 @@ on:
jobs:
tests:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
matrix:
php: ['7.4', '8.0', '8.1']

steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:2.1
tools: composer:v2
coverage: none
env:
update: true

- name: Setup Problem Matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install Dependencies
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --no-interaction --no-progress

- name: Install PHPUnit
uses: nick-invision/retry@v1
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
install:
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.0-base update
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.0-base bin all update
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.1-base update
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.1-base bin all update

phpunit:
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:8.0-cli
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:8.1-cli

phpstan-analyze:
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.0-cli analyze
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.1-cli analyze

phpstan-baseline:
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.0-cli analyze --generate-baseline
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.1-cli analyze --generate-baseline

psalm-analyze:
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.0-cli
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.1-cli

psalm-baseline:
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.0-cli --set-baseline=psalm-baseline.xml
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.1-cli --set-baseline=psalm-baseline.xml

psalm-show-info:
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.0-cli --show-info=true
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.1-cli --show-info=true

test: phpunit phpstan-analyze psalm-analyze

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,23 @@ This version supports [PHP](https://php.net) 7.4-8.1. To get started, simply req
### Standard Installation

```bash
$ composer require "m4tthumphrey/php-gitlab-api:^11.8" "guzzlehttp/guzzle:^7.4" "http-interop/http-factory-guzzle:^1.2"
$ composer require "m4tthumphrey/php-gitlab-api:^11.9" \
"guzzlehttp/guzzle:^7.5" "http-interop/http-factory-guzzle:^1.2"
```

### Framework Integration

#### Laravel:

```bash
$ composer require "graham-campbell/gitlab:^6.1"
$ composer require "graham-campbell/gitlab:^7.0"
```

#### Symfony:

```bash
$ composer require "zeichen32/gitlabapibundle:^6.0" "symfony/http-client:^5.4" "nyholm/psr7:^1.4"
$ composer require "zeichen32/gitlabapibundle:^6.0" \
"symfony/http-client:^5.4" "nyholm/psr7:^1.4"
```

We are decoupled from any HTTP messaging client by using [PSR-7](https://www.php-fig.org/psr/psr-7/), [PSR-17](https://www.php-fig.org/psr/psr-17/), [PSR-18](https://www.php-fig.org/psr/psr-18/), and [HTTPlug](https://httplug.io/). You can visit [HTTPlug for library users](https://docs.php-http.org/en/latest/httplug/users.html) to get more information about installing HTTPlug related packages. The framework integration [graham-campbell/gitlab](https://github.com/GrahamCampbell/Laravel-GitLab) is by [Graham Campbell](https://github.com/GrahamCampbell) and [zeichen32/gitlabapibundle](https://github.com/Zeichen32/GitLabApiBundle) is by [Jens Averkamp](https://github.com/Zeichen32).
Expand Down
21 changes: 14 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@
"ext-json": "*",
"ext-xml": "*",
"php-http/cache-plugin": "^1.7.5",
"php-http/client-common": "^2.5",
"php-http/discovery": "^1.14",
"php-http/httplug": "^2.2",
"php-http/client-common": "^2.6",
"php-http/discovery": "^1.15",
"php-http/httplug": "^2.3",
"php-http/multipart-stream-builder": "^1.2",
"psr/cache": "^1.0 || ^2.0 || ^3.0",
"psr/http-client-implementation": "^1.0",
"psr/http-factory-implementation": "^1.0",
"psr/http-message": "^1.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0",
"symfony/polyfill-php80": "^1.17"
"symfony/polyfill-php80": "^1.26"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1",
"guzzlehttp/guzzle": "^7.4",
"bamarni/composer-bin-plugin": "^1.8.2",
"guzzlehttp/guzzle": "^7.5",
"http-interop/http-factory-guzzle": "^1.0"
},
"autoload": {
Expand All @@ -59,7 +59,14 @@
"config": {
"preferred-install": "dist",
"allow-plugins": {
"bamarni/composer-bin-plugin": true
"bamarni/composer-bin-plugin": true,
"php-http/discovery": true
}
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false
}
}
}
7 changes: 6 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$callback of function set_error_handler expects \\(callable\\(int, string, string, int, array\\)\\: bool\\)\\|null, Closure\\(\\)\\: void given\\.$#"
message: "#^Parameter \\#1 \\$callback of function set_error_handler expects \\(callable\\(int, string, string, int\\)\\: bool\\)\\|null, Closure\\(\\)\\: void given\\.$#"
count: 1
path: src/Api/AbstractApi.php

Expand All @@ -10,6 +10,11 @@ parameters:
count: 1
path: src/Api/AbstractApi.php

-
message: "#^Parameter \\#4 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
path: src/Api/AbstractApi.php

-
message: "#^Property Gitlab\\\\Api\\\\AbstractApi\\:\\:\\$perPage is never written, only read\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion src/ResultPager.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ private function get(string $key): array
*/
private static function bindPerPage(AbstractApi $api, int $perPage): AbstractApi
{
/** @var Closure(AbstractApi): AbstractApi */
$closure = Closure::bind(static function (AbstractApi $api) use ($perPage): AbstractApi {
$clone = clone $api;

Expand All @@ -267,7 +268,6 @@ private static function bindPerPage(AbstractApi $api, int $perPage): AbstractApi
return $clone;
}, null, AbstractApi::class);

/** @var AbstractApi */
return $closure($api);
}
}
8 changes: 4 additions & 4 deletions vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"require": {
"php": "^8.0.2",
"phpstan/phpstan": "1.4.2",
"phpstan/phpstan-deprecation-rules": "1.0.0",
"phpstan/phpstan-strict-rules": "1.1.0",
"php": "^8.1",
"phpstan/phpstan": "1.10.3",
"phpstan/phpstan-deprecation-rules": "1.1.2",
"phpstan/phpstan-strict-rules": "1.5.0",
"thecodingmachine/phpstan-strict-rules": "1.0.0",
"ergebnis/phpstan-rules": "1.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions vendor-bin/psalm/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"require": {
"php": "^8.0.2",
"psalm/phar": "4.18.1"
"php": "^8.1",
"psalm/phar": "5.7.6"
},
"config": {
"preferred-install": "dist"
Expand Down

0 comments on commit 208c4a9

Please sign in to comment.