diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ae1ad66 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest'] + php-versions: ['7.4', '8.0'] + phpunit-versions: ['latest'] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, intl, sodium, sqlite + ini-values: post_max_size=256M, max_execution_time=180 + + - name: Install dependencies + run: composer install + + - name: PHPUnit tests + uses: php-actions/phpunit@v3 + env: + BOOKBOON_API_ID: ${{ secrets.BOOKBOON_API_ID }} + BOOKBOON_API_KEY: ${{ secrets.BOOKBOON_API_KEY }} + timeout-minutes: 30 + with: + memory_limit: 256M + + - name: Static Analysis + run: vendor/bin/psalm diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6810c50..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: php - -php: - - 7.3 - - 7.4 - - 8.0 - -env: - global: - secure: ZVjngag+tfsp++ohG/7dmzqdI8M20ZemYrhEpRk/1j1mTsJfdjED4YTTzBrSHld5Qc5Lq3HNPqpqwiKjxMtBdLi04vWi9PuvIStYYa6uWFBKv1m4+SGYXbyFa70uFtjtiI8X9eakRDocT2syiZqS2xafkVFHHTPCRcod1mUBQ7E= - -services: - - memcached - - redis-server - -jobs: - include: - - stage: "Tests" - name: "Unit Tests" - script: vendor/bin/phpunit -c . --coverage-clover build/logs/clover.xml - - name: "Static Analyser" - script: vendor/bin/psalm - -before_script: - - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "extension = igbinary.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build - - composer install - -after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT diff --git a/composer.json b/composer.json index c4d47b9..9d22b79 100644 --- a/composer.json +++ b/composer.json @@ -34,5 +34,10 @@ "psr-4": { "Helpers\\": "tests/Helpers/" } + }, + "config": { + "allow-plugins": { + "composer/package-versions-deprecated": true + } } } diff --git a/src/Client/OauthClient.php b/src/Client/OauthClient.php index f04ab86..08ba269 100644 --- a/src/Client/OauthClient.php +++ b/src/Client/OauthClient.php @@ -323,9 +323,9 @@ protected function normalizeHeaders(array $headers) : array return $returnHeaders; } - public function setAct(?string $act) : void + public function setAct(?string $appUserId) : void { - $this->act = $act; + $this->act = $appUserId; } public function getAct() : ?string