Skip to content

Commit

Permalink
[Laravel 10] Support PHP 8.1 - 8.3, Bump minimum Laravel to 10.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicekiwi committed Apr 27, 2024
1 parent 9a9c44c commit 05ef365
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1' ]
php: [ '8.1', '8.2', '8.3' ]
continue-on-error: true
steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": "^8.1",
"laravel/framework": "^9.0",
"laravel/framework": "^10.0",
"guzzlehttp/guzzle": "^7.2",
"ext-bcmath": "*",
"ext-simplexml": "*",
Expand Down Expand Up @@ -39,8 +39,8 @@
},
"minimum-stability": "stable",
"scripts": {
"test": "vendor/bin/phpunit",
"coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover=coverage.clover",
"coverage:html": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html ./coverage"
"test": "XDEBUG_MODE=off vendor/bin/phpunit -d memory_limit=512M",
"coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit -d memory_limit=512M --coverage-clover=coverage.clover",
"coverage:html": "XDEBUG_MODE=coverage vendor/bin/phpunit -d memory_limit=512M --coverage-html ./coverage"
}
}
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: '3'
services:
php:
build: ./docker/php/${PHP_VERSION:-8.0}
build: ./docker/php/${PHP_VERSION:-8.1}
volumes:
- $PWD:/srv/app:delegated
2 changes: 1 addition & 1 deletion docker/php/8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM php:8.1-alpine

# Install deps
RUN apk --update add linux-headers bash autoconf build-base wget curl git zip unzip zlib-dev shadow libpq
RUN apk --update add linux-headers bash autoconf build-base wget curl git zip unzip zlib-dev shadow libpq binutils-dev

# Install PHP extensions
RUN docker-php-ext-install exif pcntl bcmath
Expand Down
12 changes: 10 additions & 2 deletions src/Syntax/SteamApi/Steam/User/Stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public function GetPlayerAchievements($appId): ?array
}
}

/**
* @throws ApiCallFailedException
* @throws GuzzleException
*/
public function GetGlobalAchievementPercentagesForApp($gameId)
{
// Set up the api details
Expand All @@ -124,8 +128,10 @@ public function GetGlobalAchievementPercentagesForApp($gameId)
* @param $all bool Return all stats when true and only achievements when false
*
* @return mixed
* @throws ApiCallFailedException
* @throws GuzzleException
*/
public function GetUserStatsForGame($appId, $all = false): mixed
public function GetUserStatsForGame(int $appId, bool $all = false): mixed
{
// Set up the api details
$this->method = __FUNCTION__;
Expand All @@ -152,9 +158,11 @@ public function GetUserStatsForGame($appId, $all = false): mixed
/**
* @param $appId
*
* @return mixed
* @throws ApiCallFailedException
* @throws GuzzleException
* @link https://wiki.teamfortress.com/wiki/WebAPI/GetSchemaForGame
*
* @return mixed
*/
public function GetSchemaForGame($appId): mixed
{
Expand Down

0 comments on commit 05ef365

Please sign in to comment.