diff --git a/.github/workflows/phpunit.yml b/.github/workflows/laravel-6-8.yml similarity index 98% rename from .github/workflows/phpunit.yml rename to .github/workflows/laravel-6-8.yml index 0afe676..4df50e0 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/laravel-6-8.yml @@ -1,4 +1,4 @@ -name: phpunit +name: "Laravel 6-8" on: [ push ] jobs: diff --git a/.github/workflows/coverage.yml b/.github/workflows/laravel-8.yml similarity index 66% rename from .github/workflows/coverage.yml rename to .github/workflows/laravel-8.yml index d465061..9235099 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/laravel-8.yml @@ -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: @@ -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: | @@ -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 diff --git a/README.md b/README.md index 377a259..d6d107e 100644 --- a/README.md +++ b/README.md @@ -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" } } ``` diff --git a/composer.json b/composer.json index 902d37e..7f55167 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Driver.php b/src/Driver.php index 6ffbc0c..b18c8e3 100644 --- a/src/Driver.php +++ b/src/Driver.php @@ -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 { diff --git a/tests/DriverTest.php b/tests/DriverTest.php index 0f92b90..5048068 100644 --- a/tests/DriverTest.php +++ b/tests/DriverTest.php @@ -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; diff --git a/tests/Fixtures/Models/ReadyPayment.php b/tests/Fixtures/Models/ReadyPayment.php index afd6670..aa37a6d 100644 --- a/tests/Fixtures/Models/ReadyPayment.php +++ b/tests/Fixtures/Models/ReadyPayment.php @@ -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; diff --git a/tests/Fixtures/Models/RequestPayment.php b/tests/Fixtures/Models/RequestPayment.php index 22c0d99..789c4da 100644 --- a/tests/Fixtures/Models/RequestPayment.php +++ b/tests/Fixtures/Models/RequestPayment.php @@ -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 diff --git a/tests/Fixtures/Models/StatusPayment.php b/tests/Fixtures/Models/StatusPayment.php index cd6d117..231d954 100644 --- a/tests/Fixtures/Models/StatusPayment.php +++ b/tests/Fixtures/Models/StatusPayment.php @@ -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; diff --git a/tests/Helpers/ExceptionTest.php b/tests/Helpers/ExceptionTest.php index 6001805..d96c876 100644 --- a/tests/Helpers/ExceptionTest.php +++ b/tests/Helpers/ExceptionTest.php @@ -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 diff --git a/tests/Jobs/JobsTest.php b/tests/Jobs/JobsTest.php index 822faf1..4fd3776 100644 --- a/tests/Jobs/JobsTest.php +++ b/tests/Jobs/JobsTest.php @@ -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; diff --git a/tests/Requests/CancelTest.php b/tests/Requests/CancelTest.php index 7fe4250..61b0902 100644 --- a/tests/Requests/CancelTest.php +++ b/tests/Requests/CancelTest.php @@ -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 diff --git a/tests/Requests/GetQRTest.php b/tests/Requests/GetQRTest.php index 5f5ea57..a774245 100644 --- a/tests/Requests/GetQRTest.php +++ b/tests/Requests/GetQRTest.php @@ -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 diff --git a/tests/Resources/DetailsTest.php b/tests/Resources/DetailsTest.php index 9a34ba8..9e3cb43 100644 --- a/tests/Resources/DetailsTest.php +++ b/tests/Resources/DetailsTest.php @@ -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 diff --git a/tests/Responses/QrCodeTest.php b/tests/Responses/QrCodeTest.php index b0d3eff..e414876 100644 --- a/tests/Responses/QrCodeTest.php +++ b/tests/Responses/QrCodeTest.php @@ -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 @@ -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 { diff --git a/tests/Responses/RefundTest.php b/tests/Responses/RefundTest.php index 58af030..cc1e45e 100644 --- a/tests/Responses/RefundTest.php +++ b/tests/Responses/RefundTest.php @@ -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 diff --git a/tests/Responses/StatusTest.php b/tests/Responses/StatusTest.php index c28485a..7d2281e 100644 --- a/tests/Responses/StatusTest.php +++ b/tests/Responses/StatusTest.php @@ -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 diff --git a/tests/TestCase.php b/tests/TestCase.php index cb847b3..fb40856 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -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; @@ -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 {