diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 1fa17b12f..7a538ecaf 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -10,7 +10,8 @@ branchProtectionRules: - 'PHP 8.0 Unit Test' - 'PHP 8.1 Unit Test' - 'PHP 8.2 Unit Test' - - 'PHP 8.2 --prefer-lowest Unit Test' + - 'PHP 8.3 Unit Test' + - 'PHP 8.3 --prefer-lowest Unit Test' - 'PHP Style Check' - 'cla/google' requiredApprovingReviewCount: 1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index df9f1565a..614045f13 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,12 +11,12 @@ jobs: strategy: fail-fast: false matrix: - php: [ "7.4", "8.0", "8.1", "8.2" ] + php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ] composer-flags: [""] include: - php: "7.4" composer-flags: "--prefer-lowest " - - php: "8.2" + - php: "8.3" composer-flags: "--prefer-lowest " name: PHP ${{ matrix.php }} ${{ matrix.composer-flags }}Unit Test steps: @@ -42,7 +42,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: "7.4" + php-version: "8.1" - name: Install Dependencies uses: nick-invision/retry@v2 with: @@ -59,7 +59,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: '8.1' - name: Run Script run: | composer install diff --git a/CHANGELOG.md b/CHANGELOG.md index b6d29393c..dfb009aa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [2.15.2](https://github.com/googleapis/google-api-php-client/compare/v2.15.1...v2.15.2) (2024-01-03) + + +### Bug Fixes + +* Disallow vulnerable guzzle versions ([#2536](https://github.com/googleapis/google-api-php-client/issues/2536)) ([d1830ed](https://github.com/googleapis/google-api-php-client/commit/d1830ede17114a4951ab9e60b3b9bcd9393b8668)) +* Php 8.3 deprecated get_class method call without argument ([#2509](https://github.com/googleapis/google-api-php-client/issues/2509)) ([8c66021](https://github.com/googleapis/google-api-php-client/commit/8c6602119b631e1a9da4dbe219af18d51c8dab8e)) +* Phpseclib security vulnerability ([#2524](https://github.com/googleapis/google-api-php-client/issues/2524)) ([73705c2](https://github.com/googleapis/google-api-php-client/commit/73705c2a65bfc01fa6d7717b7f401b8288fe0587)) + ## [2.15.1](https://github.com/googleapis/google-api-php-client/compare/v2.15.0...v2.15.1) (2023-09-12) diff --git a/README.md b/README.md index b82f44f14..34960da0d 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,15 @@ Once composer is installed, execute the following command in your project root t composer require google/apiclient:^2.15.0 ``` +If you're facing a timeout error then either increase the timeout for composer by adding the env flag as `COMPOSER_PROCESS_TIMEOUT=600 composer install` or you can put this in the `config` section of the composer schema: +``` +{ + "config": { + "process-timeout": 600 + } +} +``` + Finally, be sure to include the autoloader: ```php diff --git a/composer.json b/composer.json index d483f34ea..687c2ed24 100644 --- a/composer.json +++ b/composer.json @@ -7,16 +7,16 @@ "license": "Apache-2.0", "require": { "php": "^7.4|^8.0", - "google/auth": "^1.28", + "google/auth": "^1.33", "google/apiclient-services": "~0.200", "firebase/php-jwt": "~6.0", "monolog/monolog": "^2.9||^3.0", - "phpseclib/phpseclib": "^3.0.19", - "guzzlehttp/guzzle": "~6.5||~7.0", + "phpseclib/phpseclib": "^3.0.34", + "guzzlehttp/guzzle": "~6.5.8||~7.4.5", "guzzlehttp/psr7": "^1.8.4||^2.2.1" }, "require-dev": { - "squizlabs/php_codesniffer": "^3.0", + "squizlabs/php_codesniffer": "^3.8", "symfony/dom-crawler": "~2.1", "symfony/css-selector": "~2.1", "cache/filesystem-adapter": "^1.1", diff --git a/phpcs.xml.dist b/phpcs.xml.dist index c508de9c9..5bd578a07 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -148,11 +148,7 @@ There MUST be one space between the closing parenthesis and the opening brace The structure body MUST be indented once The closing brace MUST be on the next line after the body --> - - - - - + src/aliases\.php diff --git a/src/Http/REST.php b/src/Http/REST.php index 1519f60da..70e48e4b8 100644 --- a/src/Http/REST.php +++ b/src/Http/REST.php @@ -55,7 +55,7 @@ public static function execute( $runner = new Runner( $config, sprintf('%s %s', $request->getMethod(), (string) $request->getUri()), - [get_class(), 'doExecute'], + [self::class, 'doExecute'], [$client, $request, $expectedClass] ); diff --git a/tests/Google/ClientTest.php b/tests/Google/ClientTest.php index 2a9f4a0e2..94ce8b876 100644 --- a/tests/Google/ClientTest.php +++ b/tests/Google/ClientTest.php @@ -851,9 +851,12 @@ public function testCredentialsOptionWithCredentialsLoader() ->willReturn('cache-key'); // Ensure the access token provided by our credentials loader is used - $credentials->fetchAuthToken(Argument::any()) + $credentials->updateMetadata([], null, Argument::any()) ->shouldBeCalledOnce() - ->willReturn(['access_token' => 'abc']); + ->willReturn(['authorization' => 'Bearer abc']); + $credentials->getLastReceivedToken() + ->shouldBeCalledTimes(2) + ->willReturn(null); $client = new Client(['credentials' => $credentials->reveal()]);