Skip to content

Commit

Permalink
Merge branch 'main' into rename-universe-domain-uri
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer authored Oct 22, 2024
2 parents 2447d22 + dd5f6ef commit 9d430a0
Show file tree
Hide file tree
Showing 22 changed files with 541 additions and 151 deletions.
11 changes: 0 additions & 11 deletions .github/actions/docs/entrypoint.sh

This file was deleted.

27 changes: 0 additions & 27 deletions .github/actions/docs/sami.php

This file was deleted.

42 changes: 14 additions & 28 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
name: Generate Documentation
on:
push:
branches:
- main
tags:
- "*"
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
pull_request:

permissions:
contents: write

jobs:
docs:
name: "Generate Project Documentation"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- name: Install Dependencies
uses: nick-invision/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: composer config repositories.sami vcs https://${{ secrets.GITHUB_TOKEN }}@github.com/jdpedrie/sami.git && composer require sami/sami:v4.2 && git reset --hard HEAD
- name: Generate Documentation
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: .github/actions/docs/entrypoint.sh
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: .docs
name: "Generate and Deploy Documentation"
uses: GoogleCloudPlatform/php-tools/.github/workflows/doctum.yml@main
with:
title: "Google Auth Library PHP Reference Documentation"
default_version: ${{ inputs.tag || github.head_ref || github.ref_name }}
dry_run: ${{ github.event_name == 'pull_request' }}

18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint
on:
push:
branches: [ main ]
pull_request:

permissions:
contents: read
jobs:
style:
name: PHP Style Check
uses: GoogleCloudPlatform/php-tools/.github/workflows/code-standards.yml@main

staticanalysis:
name: PHPStan Static Analysis
uses: GoogleCloudPlatform/php-tools/.github/workflows/static-analysis.yml@main
with:
autoload-file: tests/phpstan-autoload.php
34 changes: 2 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
test:
strategy:
matrix:
php: [ "8.0", "8.1", "8.2", "8.3" ]
php: [ "8.1", "8.2", "8.3" ]
os: [ ubuntu-latest ]
include:
- os: windows-latest
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.0"
php-version: "8.1"
- name: Install Dependencies
uses: nick-invision/retry@v3
with:
Expand All @@ -49,33 +49,3 @@ jobs:
command: composer update --prefer-lowest
- name: Run Script
run: vendor/bin/phpunit

style:
runs-on: ubuntu-latest
name: PHP Style Check
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Run Script
run: |
composer install
composer global require friendsofphp/php-cs-fixer:^3.0
~/.composer/vendor/bin/php-cs-fixer fix --dry-run --diff
staticanalysis:
runs-on: ubuntu-latest
name: PHPStan Static Analysis
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Run Script
run: |
composer install
composer global require phpstan/phpstan:^1.8
~/.composer/vendor/bin/phpstan analyse --autoload-file tests/phpstan-autoload.php
25 changes: 0 additions & 25 deletions .php-cs-fixer.dist.php

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

* [feat]: add support for Firebase v6.0 (#391)

## [1.42.0](https://github.com/googleapis/google-auth-library-php/compare/v1.41.0...v1.42.0) (2024-08-26)


### Features

* Add a file system cache class ([#571](https://github.com/googleapis/google-auth-library-php/issues/571)) ([8555cb0](https://github.com/googleapis/google-auth-library-php/commit/8555cb063caa5571f80d9605969411b894ee6eb0))
* Private key getters on service account credentials (https://github.com/googleapis/google-auth-library-php/pull/557) ([d2fa07b](https://github.com/googleapis/google-auth-library-php/commit/d2fa07b8a8edfa65c1bd732dac794c070e3451bc))

## [1.41.0](https://github.com/googleapis/google-auth-library-php/compare/v1.40.0...v1.41.0) (2024-07-10)


Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,25 @@ $memoryCache = new MemoryCacheItemPool;
$middleware = ApplicationDefaultCredentials::getCredentials($scope, cache: $memoryCache);
```

### FileSystemCacheItemPool Cache
The `FileSystemCacheItemPool` class is a `PSR-6` compliant cache that stores its
serialized objects on disk, caching data between processes and making it possible
to use data between different requests.

```php
use Google\Auth\Cache\FileSystemCacheItemPool;
use Google\Auth\ApplicationDefaultCredentials;

// Create a Cache pool instance
$cache = new FileSystemCacheItemPool(__DIR__ . '/cache');

// Pass your Cache to the Auth Library
$credentials = ApplicationDefaultCredentials::getCredentials($scope, cache: $cache);

// This token will be cached and be able to be used for the next request
$token = $credentials->fetchAuthToken();
```

### Integrating with a third party cache
You can use a third party that follows the `PSR-6` interface of your choice.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.41.0
1.42.0
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"docs": "https://googleapis.github.io/google-auth-library-php/main/"
},
"require": {
"php": "^8.0",
"php": "^8.1",
"firebase/php-jwt": "^6.0",
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/psr7": "^2.4.5",
Expand Down
Loading

0 comments on commit 9d430a0

Please sign in to comment.