Skip to content

Commit

Permalink
Merge pull request #12 from cashier-provider/2.x
Browse files Browse the repository at this point in the history
Upgrade dependencies
  • Loading branch information
Andrey Helldar authored Nov 29, 2021
2 parents 0512ea4 + 8067be1 commit effb181
Show file tree
Hide file tree
Showing 18 changed files with 43 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: phpunit
name: "Laravel 6-8"
on: [ push ]

jobs:
Expand Down
33 changes: 14 additions & 19 deletions .github/workflows/coverage.yml → .github/workflows/laravel-8.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: coverage
on:
push:
branches:
- main
- coverage
name: "Laravel 8"
on: [ push ]

jobs:
scrutinizer:
build:
runs-on: ubuntu-latest

name: Coverage
strategy:
fail-fast: true
matrix:
php: [ "7.3", "7.4", "8.0", "8.1" ]
laravel: [ "8.0" ]

name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}

services:
mysql:
Expand All @@ -28,9 +30,9 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, bcmath
coverage: xdebug
coverage: none

- name: Store environment variables
run: |
Expand All @@ -40,17 +42,10 @@ jobs:
echo "CASHIER_SBER_QR_TERMINAL_ID=${{ secrets.CASHIER_SBER_QR_TERMINAL_ID }}" >> .env
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction
run: composer require laravel/framework:^${{ matrix.laravel }} --prefer-stable --prefer-dist --no-progress --no-interaction

- name: Execute tests
run: |
mkdir -p build/logs
sudo vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
run: sudo vendor/bin/phpunit
env:
MYSQL_HOST: 127.0.0.1
PGSQL_HOST: 127.0.0.1

- name: Export
run: |
wget https://scrutinizer-ci.com/ocular.phar
sudo php ocular.phar code-coverage:upload --format=php-clover coverage.clover
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Or manually update `require` block of `composer.json` and run `composer update`.
```json
{
"require": {
"cashier-provider/sber-qr": "^1.0"
"cashier-provider/sber-qr": "^2.0"
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
},
"require": {
"php": "^7.3|^8.0",
"cashier-provider/core": "^1.29",
"cashier-provider/sber-auth": "^1.1",
"cashier-provider/core": "^2.0",
"cashier-provider/sber-auth": "^2.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"ext-json": "*",
"andrey-helldar/support": "^4.1",
"dragon-code/support": "^5.0",
"illuminate/database": "^6.0|^7.0|^8.0",
"orchestra/testbench": "^4.0|^5.0|^6.0",
"phpunit/phpunit": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use CashierProvider\Sber\QrCode\Responses\Cancel as CancelResponse;
use CashierProvider\Sber\QrCode\Responses\QrCode;
use CashierProvider\Sber\QrCode\Responses\Status as StatusResponse;
use Helldar\Contracts\Cashier\Http\Response;
use DragonCode\Contracts\Cashier\Http\Response;

class Driver extends BaseDriver
{
Expand Down
6 changes: 3 additions & 3 deletions tests/DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
use CashierProvider\Core\Http\Response;
use CashierProvider\Core\Services\Jobs;
use CashierProvider\Sber\QrCode\Driver as QR;
use Helldar\Contracts\Cashier\Driver as DriverContract;
use Helldar\Contracts\Cashier\Http\Response as ResponseContract;
use Helldar\Support\Facades\Http\Url;
use DragonCode\Contracts\Cashier\Driver as DriverContract;
use DragonCode\Contracts\Cashier\Http\Response as ResponseContract;
use DragonCode\Support\Facades\Http\Url;
use Illuminate\Database\Eloquent\Model;
use Tests\Fixtures\Models\RequestPayment;

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Models/ReadyPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
namespace Tests\Fixtures\Models;

use CashierProvider\Core\Concerns\Casheable;
use Helldar\LaravelSupport\Eloquent\UuidModel;
use DragonCode\LaravelSupport\Eloquent\UuidModel;
use Illuminate\Support\Carbon;
use Tests\TestCase;

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Models/RequestPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace Tests\Fixtures\Models;

use CashierProvider\Core\Concerns\Casheable;
use Helldar\LaravelSupport\Eloquent\UuidModel;
use DragonCode\LaravelSupport\Eloquent\UuidModel;

/**
* @property \Illuminate\Support\Carbon $created_at
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Models/StatusPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace Tests\Fixtures\Models;

use CashierProvider\Core\Concerns\Casheable;
use Helldar\LaravelSupport\Eloquent\UuidModel;
use DragonCode\LaravelSupport\Eloquent\UuidModel;
use Illuminate\Support\Carbon;
use Tests\TestCase;

Expand Down
4 changes: 2 additions & 2 deletions tests/Helpers/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
use CashierProvider\Core\Exceptions\Http\BankInternalErrorException;
use CashierProvider\Core\Exceptions\Http\BaseException;
use CashierProvider\Sber\QrCode\Exceptions\Manager;
use Helldar\Contracts\Http\Builder as HttpBuilder;
use Helldar\Support\Facades\Http\Builder;
use DragonCode\Contracts\Http\Builder as HttpBuilder;
use DragonCode\Support\Facades\Http\Builder;
use Tests\TestCase;

class ExceptionTest extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/Jobs/JobsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use CashierProvider\Core\Constants\Status;
use CashierProvider\Core\Facades\Config\Payment as PaymentConfig;
use CashierProvider\Core\Services\Jobs;
use Helldar\Support\Facades\Http\Url;
use DragonCode\Support\Facades\Http\Url;
use Illuminate\Support\Facades\DB;
use Tests\Fixtures\Models\RequestPayment;
use Tests\TestCase;
Expand Down
6 changes: 3 additions & 3 deletions tests/Requests/CancelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
use CashierProvider\Core\Http\Request;
use CashierProvider\Sber\QrCode\Constants\Body;
use CashierProvider\Sber\QrCode\Requests\Cancel;
use Helldar\Contracts\Cashier\Http\Request as RequestContract;
use Helldar\Contracts\Http\Builder;
use Helldar\Support\Facades\Helpers\Arr;
use DragonCode\Contracts\Cashier\Http\Request as RequestContract;
use DragonCode\Contracts\Http\Builder;
use DragonCode\Support\Facades\Helpers\Arr;
use Tests\TestCase;

class CancelTest extends TestCase
Expand Down
6 changes: 3 additions & 3 deletions tests/Requests/GetQRTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
use CashierProvider\Core\Http\Request;
use CashierProvider\Sber\QrCode\Constants\Body;
use CashierProvider\Sber\QrCode\Requests\Create;
use Helldar\Contracts\Cashier\Http\Request as RequestContract;
use Helldar\Contracts\Http\Builder;
use Helldar\Support\Facades\Helpers\Arr;
use DragonCode\Contracts\Cashier\Http\Request as RequestContract;
use DragonCode\Contracts\Http\Builder;
use DragonCode\Support\Facades\Helpers\Arr;
use Tests\TestCase;

class GetQRTest extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/DetailsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

use CashierProvider\Core\Resources\Details as BaseDetails;
use CashierProvider\Sber\QrCode\Resources\Details;
use Helldar\Contracts\Cashier\Resources\Details as DetailsContract;
use DragonCode\Contracts\Cashier\Resources\Details as DetailsContract;
use Tests\TestCase;

class DetailsTest extends TestCase
Expand Down
4 changes: 2 additions & 2 deletions tests/Responses/QrCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace Tests\Responses;

use CashierProvider\Sber\QrCode\Responses\QrCode;
use Helldar\Contracts\Cashier\Http\Response;
use DragonCode\Contracts\Cashier\Http\Response;
use Tests\TestCase;

class QrCodeTest extends TestCase
Expand Down Expand Up @@ -63,7 +63,7 @@ public function testToArray()
}

/**
* @return \CashierProvider\Sber\QrCode\Responses\QrCode|\Helldar\Contracts\Cashier\Http\Response
* @return \CashierProvider\Sber\QrCode\Responses\QrCode|\DragonCode\Contracts\Cashier\Http\Response
*/
protected function response(): Response
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Responses/RefundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

use CashierProvider\Core\Http\Response as BaseResponse;
use CashierProvider\Sber\QrCode\Responses\Cancel as CancelResponse;
use Helldar\Contracts\Cashier\Http\Response;
use DragonCode\Contracts\Cashier\Http\Response;
use Tests\TestCase;

class RefundTest extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/Responses/StatusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

use CashierProvider\Core\Http\Response as BaseResponse;
use CashierProvider\Sber\QrCode\Responses\Status;
use Helldar\Contracts\Cashier\Http\Response;
use DragonCode\Contracts\Cashier\Http\Response;
use Tests\TestCase;

class StatusTest extends TestCase
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
use CashierProvider\Core\Facades\Config\Payment as PaymentConfig;
use CashierProvider\Core\Models\CashierDetail;
use CashierProvider\Sber\QrCode\Driver;
use Helldar\Contracts\Cashier\Http\Request;
use Helldar\Contracts\Cashier\Resources\Details;
use DragonCode\Contracts\Cashier\Http\Request;
use DragonCode\Contracts\Cashier\Resources\Details;
use Illuminate\Database\Eloquent\Model as EloquentModel;
use Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables;
use Orchestra\Testbench\TestCase as BaseTestCase;
Expand Down Expand Up @@ -129,7 +129,7 @@ protected function detailsRelation(EloquentModel $model, ?Details $details): Cas
/**
* @param \CashierProvider\Sber\QrCode\Requests\BaseRequest|string $request
*
* @return \Helldar\Contracts\Cashier\Http\Request
* @return \DragonCode\Contracts\Cashier\Http\Request
*/
protected function request(string $request): Request
{
Expand Down

0 comments on commit effb181

Please sign in to comment.