3 Commits

Author SHA1 Message Date
447926e3d1 Update SeptemberFirstProvider.php
Проверка на существование сообщения о ошибке в ответе.
2024-05-26 16:22:04 +03:00
3cd9556bd7 Update composer.json 2024-05-07 13:20:31 +03:00
91ffe0f7f6 Create github-workflow 2024-05-07 13:16:05 +03:00
3 changed files with 41 additions and 2 deletions

39
.github/workflows/php.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: PHP Composer
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: composer run test

View File

@@ -17,7 +17,7 @@
"1sept"
],
"require": {
"php": "^7.3 || ^8",
"php": "^8.2",
"league/oauth2-client": "^2.0"
},
"require-dev": {

View File

@@ -84,7 +84,7 @@ class SeptemberFirstProvider extends GenericProvider
protected function checkResponse(ResponseInterface $response, $data): void
{
if (isset($data['error'])) {
throw new IdentityProviderException($data['error'].': '.$data['message'], 0, $response);
throw new IdentityProviderException($data['error']. (isset($data['message']) ? ': '.$data['message'] : ''), 0, $response);
}
}