Skip to content

Commit 120b915

Browse files
authored
Merge pull request #18 from samsonasik/php80
V4
2 parents ec4815b + ff7eeae commit 120b915

File tree

15 files changed

+105
-101
lines changed

15 files changed

+105
-101
lines changed

.github/workflows/ci_build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "ci build"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
9+
jobs:
10+
build:
11+
name: PHP ${{ matrix.php-versions }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-versions: ['8.0']
17+
steps:
18+
- name: Setup PHP Action
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
extensions: intl
22+
php-version: "${{ matrix.php-versions }}"
23+
coverage: xdebug
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
- run: "composer validate"
27+
- name: "Install dependencies"
28+
run: "composer install --prefer-dist"
29+
- name: "CS Check"
30+
run: "composer cs-check"
31+
- name: "Code analyze"
32+
run: |
33+
bin/phpstan analyse src/ --level=max -c phpstan.neon
34+
bin/rector process --dry-run
35+
- name: "Run test suite"
36+
run: "mkdir -p build/logs && bin/kahlan --coverage=4 --reporter=verbose --clover=build/logs/clover.xml"
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v1
39+
with:
40+
token: ${{ secrets.CODECOV_TOKEN }}
41+
file: ./build/logs/clover.xml
42+
flags: tests
43+
name: codecov-umbrella
44+
yml: ./codecov.yml
45+
fail_ci_if_error: true

.travis.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ ApigilityConsumer
22
=================
33

44
[![Latest Version](https://img.shields.io/github/release/samsonasik/ApigilityConsumer.svg?style=flat-square)](https://github.com/samsonasik/ApigilityConsumer/releases)
5-
[![Build Status](https://travis-ci.org/samsonasik/ApigilityConsumer.svg?branch=master)](https://travis-ci.org/samsonasik/ApigilityConsumer)
6-
[![Coverage Status](https://coveralls.io/repos/github/samsonasik/ApigilityConsumer/badge.svg?branch=master)](https://coveralls.io/github/samsonasik/ApigilityConsumer?branch=master)
5+
![ci build](https://github.com/samsonasik/ApigilityConsumer/workflows/ci%20build/badge.svg)
6+
[![Code Coverage](https://codecov.io/gh/samsonasik/ApigilityConsumer/branch/master/graph/badge.svg)](https://codecov.io/gh/samsonasik/ApigilityConsumer)
77
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)
88
[![Downloads](https://poser.pugx.org/samsonasik/apigility-consumer/downloads)](https://packagist.org/packages/samsonasik/apigility-consumer)
99

1010
Laminas API Tools Client module to consume API Services.
1111

12-
> This is README for version ^3.0 which only support php ^7.1 with laminas-servicemanager v3 and laminas-json v3
12+
> This is README for version ^4.0 which only support php ^8.0 with laminas-servicemanager v3 and laminas-json v3.
1313
14-
> For version ^2.0, you can read at [version 2 readme](https://github.com/samsonasik/ApigilityConsumer/tree/2.x.x) which only support php ^7.1 with zend-servicemanager v3 and zend-json v3
14+
> This is README for version ^3.0 you can read at [version 3 readme](https://github.com/samsonasik/ApigilityConsumer/tree/3.x.x) which only support php ^7.1 with laminas-servicemanager v3 and laminas-json v3.
15+
16+
> For version ^2.0, you can read at [version 2 readme](https://github.com/samsonasik/ApigilityConsumer/tree/2.x.x) which only support php ^7.1 with zend-servicemanager v3 and zend-json v3.
1517
1618
> For version 1, you can read at [version 1 readme](https://github.com/samsonasik/ApigilityConsumer/tree/1.x.x) which still support php ^5.6|^7.0 with zend-servicemanager v2.
1719

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525
}
2626
],
2727
"require": {
28-
"php": "^7.1",
29-
"laminas/laminas-http": "^2.6",
30-
"laminas/laminas-json": "^3.1.2",
31-
"laminas/laminas-servicemanager": "^3.3.0",
32-
"laminas/laminas-stdlib": "^3.2.1"
28+
"php": "^8.0",
29+
"laminas/laminas-http": "^2.14",
30+
"laminas/laminas-json": "^3.2",
31+
"laminas/laminas-servicemanager": "^3.6",
32+
"laminas/laminas-stdlib": "^3.3"
3333
},
3434
"require-dev": {
35-
"guzzlehttp/guzzle": "^6.3",
36-
"kahlan/kahlan": "^4.0",
37-
"laminas/laminas-coding-standard": "^2.0",
38-
"php-coveralls/php-coveralls": "^2.0",
39-
"phpstan/phpstan": "^0.11.19",
40-
"symfony/yaml": "^3.2.7"
35+
"guzzlehttp/guzzle": "^7.2",
36+
"kahlan/kahlan": "^5.1.3",
37+
"laminas/laminas-coding-standard": "^2.1.1",
38+
"php-coveralls/php-coveralls": "^2.4",
39+
"phpstan/phpstan": "^0.12.86",
40+
"rector/rector": "^0.11.20"
4141
},
4242
"config": {
4343
"bin-dir": "bin"

composer.phar

-1.9 MB
Binary file not shown.

config/module.config.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
namespace ApigilityConsumer;
44

5+
use ApigilityConsumer\Service\ClientAuthService;
6+
use ApigilityConsumer\Service\ClientAuthServiceFactory;
7+
use ApigilityConsumer\Service\ClientService;
8+
use ApigilityConsumer\Service\ClientServiceFactory;
59
return [
610
'service_manager' => [
711
'factories' => [
8-
Service\ClientAuthService::class => Service\ClientAuthServiceFactory::class,
9-
Service\ClientService::class => Service\ClientServiceFactory::class,
12+
ClientAuthService::class => ClientAuthServiceFactory::class,
13+
ClientService::class => ClientServiceFactory::class,
1014
],
1115
],
1216
];

phpcs.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44

55
<!-- Paths to check -->
66
<file>src</file>
7+
8+
<rule ref="WebimpressCodingStandard.NamingConventions.ValidVariableName">
9+
<exclude name="WebimpressCodingStandard.NamingConventions.ValidVariableName"/>
10+
</rule>
711
</ruleset>

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
parameters:
2+
checkMissingIterableValueType: false

rector.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
use Rector\Core\Configuration\Option;
4+
use Rector\Core\ValueObject\PhpVersion;
5+
use Rector\Set\ValueObject\SetList;
6+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
7+
8+
return static function (ContainerConfigurator $containerConfigurator): void {
9+
$containerConfigurator->import(SetList::PHP_80);
10+
11+
$parameters = $containerConfigurator->parameters();
12+
$parameters->set(Option::PATHS, [__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/spec']);
13+
14+
$parameters->set(Option::AUTO_IMPORT_NAMES, true);
15+
$parameters->set(Option::ENABLE_CACHE, true);
16+
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_80);
17+
};

spec/Result/ClientAuthResultSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
try {
2525
new ClientAuthResult();
2626
} catch (Error $e) {
27-
expect($e->getMessage())->toBe("Call to private ApigilityConsumer\\Result\\ClientAuthResult::__construct() from context 'Kahlan\\Cli\\Kahlan'");
27+
expect($e->getMessage())->toBe("Call to private ApigilityConsumer\\Result\\ClientAuthResult::__construct() from scope Kahlan\\Cli\\Kahlan");
2828
}
2929

3030
});

0 commit comments

Comments
 (0)