Skip to content

Commit

Permalink
feat: drop support for php 7.1, 7.2, 7.3, add support for php 8.1, 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored Apr 13, 2023
1 parent a1dc6bb commit 14bd5a2
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 17 deletions.
50 changes: 36 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,49 @@ on:

jobs:
ci:
name: CI ${{ matrix.os }} / PHP ${{ matrix.php-version }}
runs-on: ${{ matrix.os }}
name: "CI ${{ matrix.os }} / PHP ${{ matrix.php-version }}"
runs-on: "${{ matrix.os }}"
if: >
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pr approved'))
|| github.event_name == 'push'
|| github.event_name == 'push'
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0"]
os: ["ubuntu-22.04"]
php-version: ["7.4", "8.0", "8.1", "8.2"]

permissions:
contents: "read"
id-token: "write"

steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Composer install"
uses: "php-actions/composer@v6"
with:
php_version: "${{ matrix.php-version }}"

- uses: php-actions/composer@v6
- name: "Authenticate to Google Cloud"
id: "gcp-auth"
uses: "google-github-actions/auth@v1"
with:
token_format: "access_token"
workload_identity_provider: "${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}"
service_account: "${{ secrets.SERVICE_ACCOUNT }}"

- name: "Get secrets"
id: "secrets"
uses: "google-github-actions/get-secretmanager-secrets@v1"
with:
secrets: |-
SDK_TEST_CREDENTIALS:projects/${{ secrets.GCP_PROJECT_NAME }}/secrets/SDK_TEST_CREDENTIALS
- name: Create config
- name: "Create config"
env:
SDK_TEST_CREDENTIALS: ${{ secrets.SDK_TEST_CREDENTIALS }}
SDK_TEST_CREDENTIALS: "${{ steps.secrets.outputs.SDK_TEST_CREDENTIALS }}"
run: |
cat << EOF > tests/config.php
<?php
Expand All @@ -36,8 +58,8 @@ jobs:
define('PASSWORD', '$(jq -r .password <<< ${SDK_TEST_CREDENTIALS})');
EOF
- name: PHPUnit Tests
uses: php-actions/phpunit@v3
- name: "PHPUnit Tests"
uses: "php-actions/phpunit@v3"
with:
bootstrap: vendor/autoload.php
args: tests
bootstrap: "vendor/autoload.php"
args: "tests"
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"guzzlehttp/guzzle": "^7.5.0"
},
"require-dev": {
"phpunit/phpunit": "^10.0.0"
"phpunit/phpunit": ">=9"
},
"autoload": {
"files": ["src/ReportsApi.php"]
"files": [
"src/ReportsApi.php"
]
},
"license": "MIT",
"authors": [
Expand Down
11 changes: 11 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>rtbhouse-apps/renovate-config-public"
],
"packageRules": [
{
"matchManagers": [
"github-actions"
],
"matchPackageNames": [
"php-actions/phpunit"
],
"allowedVersions": "v3"
}
]
}
2 changes: 1 addition & 1 deletion src/ReportsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ function getRtbStats(
* @throws ReportsApiRequestException
*/
function getRtbConversions(string $advHash, string $dayFrom, string $dayTo, string $conventionType = Conversions::ATTRIBUTED_POST_CLICK) {
return $this->_getFromCursor("advertisers/${advHash}/conversions", [
return $this->_getFromCursor("advertisers/{$advHash}/conversions", [
'dayFrom' => $dayFrom,
'dayTo' => $dayTo,
'countConvention' => $conventionType
Expand Down

0 comments on commit 14bd5a2

Please sign in to comment.